{"openapi":"3.1.0","info":{"title":"Metorial Sessions (BYOK) API","version":"0.1.0","description":"Metorial Sessions (BYOK) lets an AI assistant read your own Metorial Sessions data through the Metorial Sessions API with a key you supply (Metorial secret API key). Read-only: 8 tools (list_sessions, get_session, list_session_providers, list_session_templates, get_session_template, list_provider_runs, get_provider_run, list_session_errors). The BYOK key travels with each request, is used for...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-metorial-sessions.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-metorial-sessions/docs"},"termsOfService":"https://connectorbay.com/byok-metorial-sessions/terms"},"servers":[{"url":"https://byok-metorial-sessions.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-metorial-sessions/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_sessions":{"post":{"operationId":"list_sessions","summary":"List MCP sessions with status, connection state, error and warning flags and message-count usage (no client secrets or c","description":"List MCP sessions with status, connection state, error and warning flags and message-count usage (no client secrets or connection URLs). Use for \"Which Metorial sessions have errors\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["active","archived","deleted"],"type":"string"},{"type":"null"}],"default":null,"description":"Only items with this status.","title":"Status"},"provider_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only items for this provider id.","title":"Provider Id"},"session_template_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only sessions created from this template id.","title":"Session Template Id"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last item of the previous page; leave empty for the first page.","title":"After"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort order by creation time.","title":"Order"}},"title":"list_sessionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_session":{"post":{"operationId":"get_session","summary":"Get one session by id with status, connection state, error and warning flags and message-count usage (no client secret).","description":"Get one session by id with status, connection state, error and warning flags and message-count usage (no client secret). Use for \"Show Metorial session ses_1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"session_id":{"description":"Session id from list_sessions.","maxLength":200,"title":"Session Id","type":"string"}},"required":["session_id"],"title":"get_sessionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_session_providers":{"post":{"operationId":"list_session_providers","summary":"List the providers attached to sessions with deployment, template origin and message-count usage. Use for \"Which provide","description":"List the providers attached to sessions with deployment, template origin and message-count usage. Use for \"Which providers are attached to Metorial session ses_1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"session_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only providers of this session id.","title":"Session Id"},"provider_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only items for this provider id.","title":"Provider Id"},"status":{"anyOf":[{"enum":["active","archived","deleted"],"type":"string"},{"type":"null"}],"default":null,"description":"Only items with this status.","title":"Status"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last item of the previous page; leave empty for the first page.","title":"After"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort order by creation time.","title":"Order"}},"title":"list_session_providersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_session_templates":{"post":{"operationId":"list_session_templates","summary":"List the reusable session templates of your project with name, description and status. Use for \"What Metorial session te","description":"List the reusable session templates of your project with name, description and status. Use for \"What Metorial session templates do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["active","archived","deleted"],"type":"string"},{"type":"null"}],"default":null,"description":"Only items with this status.","title":"Status"},"provider_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only items for this provider id.","title":"Provider Id"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last item of the previous page; leave empty for the first page.","title":"After"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort order by creation time.","title":"Order"}},"title":"list_session_templatesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_session_template":{"post":{"operationId":"get_session_template","summary":"Get one session template by id with name, description and status. Use for \"Show Metorial session template stp_1\".","description":"Get one session template by id with name, description and status. Use for \"Show Metorial session template stp_1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"session_template_id":{"description":"Template id from list_session_templates.","maxLength":200,"title":"Session Template Id","type":"string"}},"required":["session_template_id"],"title":"get_session_templateArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_provider_runs":{"post":{"operationId":"list_provider_runs","summary":"List provider runs (one per running tool server instance) with status, session, provider and completion time. Use for \"W","description":"List provider runs (one per running tool server instance) with status, session, provider and completion time. Use for \"Which Metorial provider runs are still running\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["running","stopped"],"type":"string"},{"type":"null"}],"default":null,"description":"Only runs with this status.","title":"Status"},"session_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only runs of this session id.","title":"Session Id"},"provider_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only items for this provider id.","title":"Provider Id"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last item of the previous page; leave empty for the first page.","title":"After"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort order by creation time.","title":"Order"}},"title":"list_provider_runsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_provider_run":{"post":{"operationId":"get_provider_run","summary":"Get one provider run by id with status, session, provider and completion time (no logs). Use for \"Show Metorial provider","description":"Get one provider run by id with status, session, provider and completion time (no logs). Use for \"Show Metorial provider run prn_1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"provider_run_id":{"description":"Provider run id from list_provider_runs.","maxLength":200,"title":"Provider Run Id","type":"string"}},"required":["provider_run_id"],"title":"get_provider_runArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_session_errors":{"post":{"operationId":"list_session_errors","summary":"List session errors with error code, status, session, run and similar-error count (error messages and data are left out)","description":"List session errors with error code, status, session, run and similar-error count (error messages and data are left out). Use for \"Which Metorial sessions are throwing tool errors\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"session_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only errors of this session id.","title":"Session Id"},"provider_run_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only errors of this provider run id.","title":"Provider Run Id"},"provider_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only items for this provider id.","title":"Provider Id"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: the id of the last item of the previous page; leave empty for the first page.","title":"After"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort order by creation time.","title":"Order"}},"title":"list_session_errorsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}