Skip to main content
Glama

Qumge: Agent Capabilities & Skills

Call Cap

call_cap
Destructive

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. For metered Caps, call quote_cap first and pass its quote_id together with a stable idempotency_key; the order is reserved at the quoted amount. Asynchronous calls return a platform job_id and get_cap_job reads cached progress and the final receipt for free. 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.)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "slug": "<slug>"
    },
    "name": "call_cap"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoRequest body. An object is sent as JSON; a string is sent as-is.
pathNoThe route path from get_cap, e.g. '/api/videos'. A query string may be appended or passed separately in `query`.
slugYesThe Cap's slug, from search_caps.
inputNoArguments 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.
queryNoQuery string without the leading '?'.
acceptNoOptional Accept header.
methodNoHTTP method. Default GET — the routes and their methods are in get_cap.
quote_idNoAccepted quote from quote_cap. Required for metered Caps: the order is reserved at the quoted amount. The same quote can create only one order.
operationNoOperation name from get_cap (a route's `name`). Use with `input`; takes precedence over `path`/`method` when both are given.
qumge_keyNoOptional: your Qumge API key, for clients that cannot set an Authorization header. Takes precedence over the header. Never echoed back.
content_typeNoOnly needed when `body` is a string and the app expects a specific type.
idempotency_keyNoStable key for retries of the same operation and input. Replays the original managed order; changed input is rejected. Required with quote_id.
accepted_contract_digestNoFor a changed deliverable contract, pass the current get_cap contract_state.contract_digest only after confirming its deliverables, price and buyer spending authority. Do not silently reuse old permission.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / accepted_contract_digest
      Added value: +{
      +  "description": "For a changed deliverable contract, pass the current get_cap contract_state.contract_digest only after confirming its deliverables, price and buyer spending authority. Do not silently reuse old permission.",
      +  "type": "string"
      +}
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "Stable key for retries of the same operation and input. Replays the original managed order; changed input is rejected. Required with quote_id.",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / quote_id
      Added value: +{
      +  "description": "Accepted quote from quote_cap. Required for metered Caps: the order is reserved at the quoted amount. The same quote can create only one order.",
      +  "type": "string"
      +}
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "binary": {
      +        "type": "boolean"
      +      },
      +      "body": {
      +        "type": "string"
      +      },
      +      "body_bytes": {
      +        "type": "integer"
      +      },
      +      "call_id": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "charged_micro_usd": {
      +        "type": [
      +          "integer",
      +          "null"
      +        ]
      +      },
      +      "content_type": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "direct_url": {
      +        "type": "string"
      +      },
      +      "free_call": {
      +        "description": "Set when this call used one of the operation's free calls (users who have topped up).",
      +        "properties": {
      +          "limit": {
      +            "type": "integer"
      +          },
      +          "pending": {
      +            "type": "boolean"
      +          },
      +          "remaining": {
      +            "type": "integer"
      +          },
      +          "used": {
      +            "type": "integer"
      +          }
      +        },
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "method": {
      +        "type": "string"
      +      },
      +      "path": {
      +        "type": "string"
      +      },
      +      "remaining_micro_usd": {
      +        "type": [
      +          "integer",
      +          "null"
      +        ]
      +      },
      +      "status": {
      +        "type": "integer"
      +      },
      +      "truncated": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "method",
      +      "path",
      +      "body"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "call_id": {
      +        "type": "string"
      +      },
      +      "cancellation": {
      +        "description": "Optional timeout notification status; acknowledgement does not prove that provider work stopped.",
      +        "type": "object"
      +      },
      +      "completed_at": {
      +        "description": "When the platform observed and finalized a terminal outcome, including polling delay.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "created_at": {
      +        "description": "Platform order creation time.",
      +        "format": "date-time",
      +        "type": "string"
      +      },
      +      "deadline_at": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "delivery": {
      +        "description": "Separate provider result retention / URL renewal from the platform's cached inline result. Inline result reads are free; no automatic expiry is currently configured, which is not a permanent storage guarantee.",
      +        "type": "object"
      +      },
      +      "error": {
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "error_omitted": {
      +        "description": "The provider error is omitted from this tool response; read job_url for the full cached document.",
      +        "type": "boolean"
      +      },
      +      "job_id": {
      +        "type": "string"
      +      },
      +      "job_url": {
      +        "description": "Free authenticated GET endpoint for the full cached job document.",
      +        "format": "uri",
      +        "type": "string"
      +      },
      +      "next_action": {
      +        "properties": {
      +          "arguments": {
      +            "properties": {
      +              "job_id": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "job_id"
      +            ],
      +            "type": "object"
      +          },
      +          "tool": {
      +            "const": "get_cap_job"
      +          }
      +        },
      +        "required": [
      +          "tool",
      +          "arguments"
      +        ],
      +        "type": "object"
      +      },
      +      "next_poll_after_seconds": {
      +        "type": "integer"
      +      },
      +      "receipt": {
      +        "properties": {
      +          "charged_micro_usd": {
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "reserved_micro_usd": {
      +            "type": "integer"
      +          },
      +          "settled_at": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "status": {
      +            "enum": [
      +              "reserved",
      +              "settled"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "status",
      +          "reserved_micro_usd",
      +          "charged_micro_usd"
      +        ],
      +        "type": "object"
      +      },
      +      "result": {},
      +      "result_omitted": {
      +        "description": "The complete result is omitted from this tool response; read job_url for the full cached document.",
      +        "type": "boolean"
      +      },
      +      "started_at": {
      +        "description": "First platform submission attempt; not the provider's actual generation start.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "status": {
      +        "enum": [
      +          "submitting",
      +          "acceptance_unknown",
      +          "queued",
      +          "running",
      +          "succeeded",
      +          "failed",
      +          "expired"
      +        ]
      +      },
      +      "timing": {
      +        "description": "Platform-observed elapsed time and optional explicitly provider-reported queue/processing times. Missing generation or validation durations are null, never inferred.",
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "job_id",
      +      "call_id",
      +      "status",
      +      "receipt"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / properties
      Removed value: -{
      -  "binary": {
      -    "type": "boolean"
      -  },
      -  "body": {
      -    "type": "string"
      -  },
      -  "body_bytes": {
      -    "type": "integer"
      -  },
      -  "call_id": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "charged_micro_usd": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "content_type": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "direct_url": {
      -    "type": "string"
      -  },
      -  "free_call": {
      -    "description": "Set when this call used one of the operation's free calls (users who have topped up).",
      -    "properties": {
      -      "limit": {
      -        "type": "integer"
      -      },
      -      "pending": {
      -        "type": "boolean"
      -      },
      -      "remaining": {
      -        "type": "integer"
      -      },
      -      "used": {
      -        "type": "integer"
      -      }
      -    },
      -    "type": [
      -      "object",
      -      "null"
      -    ]
      -  },
      -  "method": {
      -    "type": "string"
      -  },
      -  "path": {
      -    "type": "string"
      -  },
      -  "remaining_micro_usd": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "status": {
      -    "type": "integer"
      -  },
      -  "truncated": {
      -    "type": "boolean"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "status",
      -  "method",
      -  "path",
      -  "body"
      -]
  2. Changed1 schema field changed
    • changedInput schema / properties / slug / description
      Previous value: -"The cap's slug, from search_caps."New value: +"The Cap's slug, from search_caps."
  3. Changed1 schema field changed
    • changedInput schema / properties / input / description
      Previous value: -"Arguments for the operation. Validated against its input_schema when it has one — an invalid input is refused with 422, and nothing is charged or forwarded."New value: +"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."
  4. Changed1 schema field changed
    • addedOutput schema / properties / free_call
      Added value: +{
      +  "description": "Set when this call used one of the operation's free calls (users who have topped up).",
      +  "properties": {
      +    "limit": {
      +      "type": "integer"
      +    },
      +    "pending": {
      +      "type": "boolean"
      +    },
      +    "remaining": {
      +      "type": "integer"
      +    },
      +    "used": {
      +      "type": "integer"
      +    }
      +  },
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
  5. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "binary": {
      +      "type": "boolean"
      +    },
      +    "body": {
      +      "type": "string"
      +    },
      +    "body_bytes": {
      +      "type": "integer"
      +    },
      +    "call_id": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "charged_micro_usd": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "content_type": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "direct_url": {
      +      "type": "string"
      +    },
      +    "method": {
      +      "type": "string"
      +    },
      +    "path": {
      +      "type": "string"
      +    },
      +    "remaining_micro_usd": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "type": "integer"
      +    },
      +    "truncated": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "method",
      +    "path",
      +    "body"
      +  ],
      +  "type": "object"
      +}
  6. Added

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only flag readOnlyHint=false, destructiveHint=true and openWorldHint=true; the description goes far beyond by disclosing that the user's balance is charged at the same price as raw HTTP, that input validation happens before any charge, that a 5xx from the Cap is free, that a 402 signals a balance or monthly-limit block, and that idempotency replays the original order while changed input is rejected. That is exactly the spend-and-retry context a mutating tool needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and then organized roughly in call order (preconditions → pricing → async → errors → legacy alias). It is a dense single paragraph with several parentheticals, so it is close to overstuffed, but nearly every clause carries actionable information rather than restating the name or schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter, open-world, balance-charging proxy tool with an output schema and annotations, the description covers auth, pricing, validation order, async handoff, retry semantics, and the two failure classes that matter (5xx free, 402 blocked). Nothing an agent needs in order to call it safely and correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description adds real relationships the schema cannot express on its own — that `operation` + `input` is the preferred path and that quote_id must be paired with a stable idempotency_key to reserve the quoted amount. It stops short of explaining several other parameters (path/query/body/accepted_contract_digest), which the schema already covers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — call a Cap on the user's behalf and return its response — and immediately situates it against the sibling workflow (get_cap for operations/prices, quote_cap for metered pricing, get_cap_job for async progress). An agent can distinguish it from list_caps/search_caps/get_cap without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing conditions: use this when you cannot make the HTTP call yourself; prefer `operation` + `input`; call quote_cap first for metered Caps and pass quote_id with an idempotency_key; use get_cap_job rather than polling for async results. It also states the prerequisite (qumge key in the Authorization header) and the alternative legacy name call_app.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources