call_cap
Call a Cap on the user's behalf and return its response. Use this when you cannot make the HTTP call yourself: qumge charges the user's qumge balance and forwards the call at the same price as calling it over HTTP through Qumge. Operations and prices come from get_cap. Prefer operation + input: when the operation declares an input_schema, input is validated against it before anything is charged or forwarded. Needs the user's qumge key in the Authorization header. A 5xx from the Cap is free; a 402 means the user's balance or this Cap's monthly limit stopped it. (Older clients may still call this tool as call_app — it still works.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Request body. An object is sent as JSON; a string is sent as-is. | |
| path | No | The route path from get_cap, e.g. '/api/videos'. A query string may be appended or passed separately in `query`. | |
| slug | Yes | The Cap's slug, from search_caps. | |
| input | No | Arguments for the operation. Validated against its input_schema when it has one — an invalid input is refused as a tool error (isError), and nothing is charged or forwarded. | |
| query | No | Query string without the leading '?'. | |
| accept | No | Optional Accept header. | |
| method | No | HTTP method. Default GET — the routes and their methods are in get_cap. | |
| operation | No | Operation name from get_cap (a route's `name`). Use with `input`; takes precedence over `path`/`method` when both are given. | |
| qumge_key | No | Optional: your Qumge API key, for clients that cannot set an Authorization header. Takes precedence over the header. Never echoed back. | |
| content_type | No | Only needed when `body` is a string and the app expects a specific type. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| path | Yes | ||
| binary | No | ||
| method | Yes | ||
| status | Yes | ||
| call_id | No | ||
| free_call | No | Set when this call used one of the operation's free calls (users who have topped up). | |
| truncated | No | ||
| body_bytes | No | ||
| direct_url | No | ||
| content_type | No | ||
| charged_micro_usd | No | ||
| remaining_micro_usd | No |