Skip to main content
Glama

Approve spending credits

approve_spending

Records that the USER approved spending credits: valid until that total is spent, for up to 6 hours (a whole batch of tracks fits in one yes); generate_sounds, generate_voice, generate_music and sounds_for_folder refuse without it. Call it ONLY after you showed the user the whole plan with the total cost ("Posso gerar por créditos? Você tem .") and the user explicitly said yes to THAT cost in their last message. Never call it on your own, never because the user asked for a game or said 'do everything' before seeing the cost. credits = the total the user approved (it replaces any earlier approval).

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": {
      "credits": "<credits>",
      "plan": "<plan>",
      "user_reply": "<user_reply>"
    },
    "name": "approve_spending"
  }
}

Input Schema

NameRequiredDescriptionDefault
planYesWhat you asked the user to approve (the events, variations and durations).
creditsYesThe total the user approved.
user_replyYesThe user's own words saying yes, copied exactly.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description adds materially more: the approval expires when the total is spent or after 6 hours, whichever comes first, and it supersedes any prior approval. What it does not say is what happens on a rejected/stale approval (error vs. silent no-op) or whether concurrent approvals are possible.

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 action and validity, then the gating, then the call protocol — a sensible order. It is dense and every clause carries a rule, though the embedded example approval sentence is long and mixes languages, slightly raising parse cost.

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?

Three required parameters, no output schema, and thin annotations, yet the description supplies the approval lifecycle, the expiry rule, the replacement semantics, and the exact conversational precondition the agent must satisfy. Nothing needed to call it 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 baseline is 3; the description still adds meaning by clarifying that 'credits' is the total the user actually approved and that it replaces earlier approvals, which the schema field text does not state. The plan and user_reply semantics are largely restatements of the schema descriptions.

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+resource ('Records that the USER approved spending credits') and immediately scopes it with the validity window and the constraint that a whole batch of tracks fits in one approval. It also names the four sibling tools that refuse without it, so an agent can place it relative to the generation tools 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?

Gives an explicit precondition (show the whole plan with total cost, quoting the approval phrase) and an explicit prohibition set: never on your own initiative, never on a request for a game or a blanket 'do everything' issued before the cost was seen. The alternative — re-approval replacing an earlier approval via 'credits' — is also covered.

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