{"components":{"schemas":{"CallBody":{"properties":{"input":{"type":"object"},"options":{"properties":{"cache":{"enum":["default","bypass","only"]},"dry_run":{"type":"boolean"},"max_cost_micros":{"type":"integer"},"provider":{"type":"string"}},"type":"object"}},"type":"object"},"Error":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{},"message":{"type":"string"}},"type":"object"},"ok":{"const":false}},"type":"object"}},"securitySchemes":{"bearer":{"scheme":"bearer","type":"http"}}},"info":{"description":"The tool rail: search, describe and call schema-typed tools on one key.","title":"Scribase Toolgate","version":"0.1.0"},"openapi":"3.1.0","paths":{"/mcp":{"post":{"summary":"MCP streamable HTTP (JSON-RPC)"}},"/v1/auth/signup":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"type":"string"},"org_name":{"type":"string"},"project_name":{"type":"string"}},"required":["org_name"],"type":"object"}}}},"responses":{"201":{"description":"org + project + key (shown once)"},"400":{"description":"invalid org_name/email"},"404":{"description":"signup disabled"}},"security":[],"summary":"Self-serve signup: creates an org, a default project and a full-scope key"}},"/v1/balance":{"get":{"summary":"Mint balance, spend vs caps, top-up URL"}},"/v1/balance/topup":{"post":{"summary":"Start a Dodo top-up checkout through Mint"}},"/v1/bundles":{"get":{"summary":"List SKILL.md bundles"},"post":{"summary":"Push a bundle"}},"/v1/bundles/{id}/skill.md":{"get":{"summary":"Download SKILL.md (no secrets)"}},"/v1/catalog":{"get":{"security":[],"summary":"Every capability and tool with live pricing, as JSON"}},"/v1/credentials":{"get":{"summary":"List credential metadata (values never returned)"},"post":{"summary":"Store a credential (write-only)"}},"/v1/credentials/{id}":{"delete":{"summary":"Delete a credential"}},"/v1/keys":{"get":{"summary":"List keys"},"post":{"summary":"Create a key (one key for Relay and Toolgate)"}},"/v1/keys/{id}":{"patch":{"summary":"Update scopes, tool allowlist, cap"}},"/v1/keys/{id}/revoke":{"post":{"summary":"Revoke a key"}},"/v1/passthrough/{tool_id}/{path}":{"post":{"summary":"Faithful relay for admin-registered BYO tools"}},"/v1/project":{"get":{"summary":"Project settings"},"patch":{"summary":"Caps, routing policy, pinned MCP tools"}},"/v1/tools/batch":{"post":{"summary":"Up to 50 calls under one hold"}},"/v1/tools/search":{"get":{"parameters":[{"in":"query","name":"q","required":true,"schema":{"type":"string"}},{"in":"query","name":"side_effect","schema":{"enum":["read","write","send","spend"]}},{"in":"query","name":"max_price_micros","schema":{"type":"integer"}},{"in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{},"ok":{"type":"boolean"}},"type":"object"}}},"description":"hits"}},"summary":"Search tools by task"}},"/v1/tools/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"schemas, price, routing"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unknown"}},"summary":"Describe a tool or capability (spends nothing)"}},"/v1/tools/{id}/call":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallBody"}}}},"responses":{"200":{"description":"data + meta{call_id, provider, cost_micros, cache, fallback_chain, receipt_id}"},"402":{"description":"insufficient balance"},"409":{"description":"idempotency conflict"},"422":{"description":"invalid input"},"424":{"description":"all providers failed"},"429":{"description":"cap exceeded"}},"summary":"Call a tool or capability"}},"/v1/usage":{"get":{"summary":"Usage and spend grouped by tool, provider, key or day"}},"/v1/usage/calls":{"get":{"summary":"Audit log"}},"/v1/usage/calls/{id}":{"get":{"summary":"One call with receipt and hash-chain proof"}}},"security":[{"bearer":[]}],"servers":[{"url":"https://toolgate.scribase.com"}]}