API Reference
FragsRouter OpenAPI
The REST API for running plans and managing the tools they call. Every request is authenticated with a bearer token and scoped to your workspace.
Authentication
Pass your key as a bearer token: Authorization: Bearer $DIAPHORA_API_KEY
Plans
Run stored or ephemeral plans and inspect the tool requirements each run depends on.
Run a plan
/plan/{planId}/_runExecute a stored plan by ID and return the full result once the run completes. Pass runtime parameters, auth overrides, and inline resources in the request body.
Path parameters
Request body · application/json
Responses
Schema execute_response_body is defined in a shared spec and isn't inlined here.
Stream a plan run
/plan/{planId}/_streamExecute a stored plan and stream progress and output as Server-Sent Events. Use this for long-running plans where you want incremental tokens and step-by-step updates.
Path parameters
Request body · application/json
Responses
Stream an ephemeral plan
/plan/_streamRun an unsaved (ephemeral) plan supplied inline in the request and stream the result as Server-Sent Events. Nothing is persisted.
Request body · application/json
Responses
Refresh plan MCP requirements
/plan/{planId}/_refresh-mcp-requirementsRe-evaluate the MCP servers a plan depends on and return the refreshed list. Call this after connecting new tools or rotating credentials.
Path parameters
Responses
An array of mcp_server.
Check plan MCP requirements
/plan/{planId}/_check-mcp-requirementsReturn the current readiness of every MCP requirement a plan needs, so you can prompt the user to connect anything that isn't ready yet.
Path parameters
Responses
Tools
Discover MCP requirements and call commands on connected tool servers.
Check tool MCP requirements
/tools/_check-mcp-requirementsList the MCP requirements for the calling context's tools and whether each one is ready to use.
Responses
Check ephemeral plan requirements
/tools/_check-mcp-requirementsGiven an inline plan body, return the MCP requirements it would need — without saving the plan.
Request body · application/json
Responses
List tool commands
/tools/{toolsId}/{serverId}/_list-commandsList the callable commands exposed by a connected tool server, including each command's name, description, and input schema.
Path parameters
Responses
Call a tool command
/tools/{toolsId}/{serverId}/_call-command/{commandName}Invoke a single command on a connected tool server and return its raw result.
Path parameters
Responses
A JSON object of arbitrary key/value pairs.
MCP
Manage MCP server authorization — complete OAuth handshakes and inspect the credential cache.
MCP OAuth callback
/mcp/callbackOAuth redirect endpoint that completes an MCP server authorization handshake. The MCP provider redirects the user here with a state and code.
Query parameters
Responses
List cached MCP authorizations
/mcp/auth/cacheList cached MCP authorization entries, including the domain, client, and expiry for each.
Responses
Delete a cached MCP authorization
/mcp/auth/cache/{cacheId}Delete a cached MCP authorization entry by ID, forcing re-authorization on the next call.
Path parameters
Responses
Utilities
Helper endpoints for working with the runtime.
Render a template
/util/template/_renderRender a template string against a scope object and return the resulting text. Useful for previewing prompt or message templates.
Request body · application/json
Responses