{"openapi":"3.1.0","info":{"title":"Working Machines Runtime API","version":"1.0.0","description":"Discover Agent Apps and actions, inspect action contracts, and execute structured work through the hosted Working Machines runtime.","license":{"name":"Working Machines hosted service terms","url":"https://www.workingmachines.dev/terms"},"termsOfService":"https://www.workingmachines.dev/terms","contact":{"name":"Working Machines","url":"https://www.workingmachines.dev/contact"}},"servers":[{"url":"https://app.workingmachines.dev","description":"Working Machines production runtime"}],"externalDocs":{"description":"Working Machines documentation","url":"https://www.workingmachines.dev/docs"},"tags":[{"name":"Health","description":"Runtime availability"},{"name":"Catalog","description":"Provider and action discovery"},{"name":"Actions","description":"Action contracts and execution"},{"name":"MCP","description":"Model Context Protocol transport"}],"paths":{"/health":{"get":{"operationId":"getRuntimeHealth","summary":"Check runtime health","tags":["Health"],"security":[],"responses":{"200":{"description":"Runtime is available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"400":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"503":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}}}}},"/v1/providers":{"get":{"operationId":"listProviders","summary":"List available Agent Apps","tags":["Catalog"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Case-insensitive provider filter."},{"name":"service","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true}],"responses":{"200":{"description":"A page of provider summaries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderListResponse"}}}},"401":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"429":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}}}}},"/v1/actions":{"get":{"operationId":"listActions","summary":"List structured actions","tags":["Catalog"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"service","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of action summaries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionListResponse"}}}},"401":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"429":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}}}}},"/v1/actions/search":{"get":{"operationId":"searchActions","summary":"Find actions by intent","tags":["Catalog"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","schema":{"type":"string","minLength":2},"description":"Search text. Provide q or query."},{"name":"query","in":"query","schema":{"type":"string","minLength":2},"description":"Alias for q."},{"name":"service","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"Actions ranked for the requested intent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionListResponse"}}}},"400":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"401":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"429":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}}}}},"/v1/actions/{actionId}":{"parameters":[{"name":"actionId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"getAction","summary":"Inspect an action contract","tags":["Actions"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Action metadata and input schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResponse"}}}},"401":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"404":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}}}},"post":{"operationId":"executeAction","summary":"Execute an action","description":"Runs one structured provider action through a named or default connection.","tags":["Actions"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Prevents accidental duplicate execution."},{"name":"x-oo-connector-alias","in":"header","schema":{"type":"string"},"description":"Optional connection alias."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteActionRequest"}}}},"responses":{"200":{"description":"The external action completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionResponse"}}}},"400":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"401":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"403":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"404":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"409":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"429":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"502":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}}}}},"/mcp":{"post":{"operationId":"sendMcpMessage","summary":"Send a Streamable HTTP MCP message","description":"MCP clients should use OAuth discovery and negotiate capabilities through the protocol rather than calling this operation manually.","tags":["MCP"],"security":[{"oauth2":["mcp:tools"]},{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}},"responses":{"200":{"description":"JSON-RPC or streamed MCP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}},"text/event-stream":{"schema":{"type":"string"}}}},"202":{"description":"Message accepted."},"400":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"401":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}},"406":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/AuthError"}]}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Working Machines runtime token"},"oauth2":{"type":"oauth2","description":"OAuth 2.1 authorization for user-controlled MCP clients.","flows":{"authorizationCode":{"authorizationUrl":"https://app.workingmachines.dev/auth/oauth2/authorize","tokenUrl":"https://app.workingmachines.dev/auth/oauth2/token","scopes":{"openid":"Confirm the user's identity.","profile":"Read the user's basic profile.","offline_access":"Refresh access without repeating consent every session.","mcp:tools":"Discover and invoke tools authorized for the workspace."}}}}},"schemas":{"HealthResponse":{"type":"object","required":["ok"],"additionalProperties":false,"properties":{"ok":{"const":true}}},"ProviderSummary":{"type":"object","required":["service","displayName","iconUrl","homepageUrl","categories","scenario","authTypes"],"properties":{"service":{"type":"string","examples":["github"]},"displayName":{"type":"string","examples":["GitHub"]},"iconUrl":{"type":["string","null"],"format":"uri"},"homepageUrl":{"type":["string","null"],"format":"uri"},"categories":{"type":"array","items":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}}},"scenario":{"type":"string"},"authTypes":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"ActionSummary":{"type":"object","required":["id","service","name","description","requiredScopes","providerPermissions","inputSchema","outputSchema","followUpActions","asyncLifecycle","execution"],"properties":{"id":{"type":"string","examples":["github.get_current_user"]},"service":{"type":"string","examples":["github"]},"name":{"type":"string"},"description":{"type":"string"},"requiredScopes":{"type":"array","items":{"type":"string"}},"providerPermissions":{"type":"array","items":{"type":"string"}},"inputSchema":{"type":"object","additionalProperties":true},"outputSchema":{"type":"object","additionalProperties":true},"followUpActions":{"type":"array","items":{"type":"object","required":["actionId"],"properties":{"actionId":{"type":"string"}}}},"asyncLifecycle":{"type":["object","null"],"additionalProperties":true},"execution":{"type":"object","additionalProperties":true}},"additionalProperties":true},"ProviderListResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"const":true},"message":{"const":"OK"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProviderSummary"}},"meta":{"type":"object","additionalProperties":true}},"additionalProperties":true},"ActionListResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"const":true},"message":{"const":"OK"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ActionSummary"}},"meta":{"type":"object","additionalProperties":true}},"additionalProperties":true},"ActionResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"const":true},"message":{"const":"OK"},"data":{"$ref":"#/components/schemas/ActionSummary"},"meta":{"type":"object","additionalProperties":true}},"additionalProperties":true},"ExecuteActionRequest":{"type":"object","properties":{"input":{"type":"object","additionalProperties":true,"default":{}},"connectionName":{"type":"string"},"alias":{"type":"string"}},"additionalProperties":false},"ExecutionResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"const":true},"message":{"const":"OK"},"data":{},"meta":{"type":"object","additionalProperties":true}},"additionalProperties":true},"ErrorEnvelope":{"type":"object","required":["success","message","data","errorCode","meta"],"properties":{"success":{"const":false},"message":{"type":"string"},"data":{},"errorCode":{"type":"string","examples":["unknown_action"]},"meta":{"type":"object","additionalProperties":true}},"additionalProperties":false},"AuthError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","examples":["unauthorized"]},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":false},"JsonRpcRequest":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","integer","null"]},"method":{"type":"string"},"params":{}},"additionalProperties":false},"JsonRpcResponse":{"type":"object","required":["jsonrpc"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","integer","null"]},"result":{},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{}}}},"additionalProperties":true}}},"x-mcp-endpoint":"https://app.workingmachines.dev/mcp"}