Skip to main content
Glama

Set monthly spending cap

set_spend_cap
DestructiveIdempotent

Set or change the customer's monthly spending cap: the most that calls, SMS and the voice agent may cost in one calendar month in the account country time zone (Europe/Prague for Czech accounts). capHal is the cap in integer hellers excluding VAT, from 5000 (50.00 CZK) to 100000000 (1,000,000.00 CZK); ask the customer for the amount and, before calling, repeat it to them in crowns, and after the call repeat the amount from the response again. warnShare (0.5 to 0.99, default 0.8) is the share of the cap at which a warning e-mail is sent. inboundAboveCap true keeps answering inbound calls to the account's agents above the cap; the default false makes them end after one sentence at no cost; when omitted on a change, the saved value stays. Once the cap is reached, new outbound calls and SMS fail with spend_cap_reached (HTTP 402) until the month ends or the cap is raised or removed; calls already in progress still finish, so the total can end slightly above the cap. Number fees, the monthly plan and Done for you orders are not counted and not stopped. Calling it again with the same values sets the same cap, but it renews this month's warning e-mails (they can be sent again). Same data as PUT /v1/account/spend-cap (response schema in /openapi.json).

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": {
      "capHal": "<capHal>"
    },
    "name": "set_spend_cap"
  }
}

Input Schema

NameRequiredDescriptionDefault
capHalYesMonthly cap in integer hellers excluding VAT, 5000 to 100000000. For example 500000 means 5000 CZK.
warnShareNoShare of the cap at which the warning e-mail is sent, 0.5 to 0.99. Default 0.8: when omitted, 0.8 is used on every call, including a change, because the saved value is not kept.
inboundAboveCapNotrue keeps answering inbound calls to the account's agents above the cap. Default false; omit to keep the saved value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that new outbound calls and SMS fail with spend_cap_reached (HTTP 402) once the cap is hit, that in-flight calls still complete and can push spend slightly over, which fees (number fees, monthly plan, Done for you orders) are excluded, and that inboundAboveCap defaults to ending calls after one sentence at no cost. It also flags the non-idempotent side effect that repeating an identical call renews warning e-mails, and the subtle warnShare default behavior.

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 purpose and scoping, and every sentence carries substantive information about limits, failure modes or side effects. It is a single dense paragraph, though, and the length verges on a wall of text for a three-parameter tool.

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 destructive, idempotent-with-side-effects mutation with no output schema, the description covers limits, currency, VAT treatment, failure semantics, in-progress call behavior, excluded charges, default handling per parameter, and what to say to the customer. An agent could invoke this correctly and explain the consequences without any other source.

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 already 100%, so the baseline is 3; the description earns more by adding real meaning — hellers excluding VAT with concrete CZK equivalences, the customer-facing instruction to confirm amounts in crowns, the warnShare threshold as the point where a warning e-mail fires, and the precise consequence of inboundAboveCap=false (calls end after one sentence at no cost). It also clarifies that an omitted inboundAboveCap preserves the saved value.

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?

Opens with a specific verb and resource ('Set or change the customer's monthly spending cap') and immediately defines the scope: calls, SMS and voice agent cost within one calendar month in the account country time zone. An agent can distinguish this from clear_spend_cap and get_spend_cap without opening a schema.

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

Usage Guidelines4/5

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

Gives concrete operational guidance: ask the customer for the amount, repeat it in crowns before calling and again from the response afterward, and notes that re-calling with identical values re-arms this month's warning e-mails. It does not explicitly name clear_spend_cap or get_spend_cap as alternatives, so routing between siblings is only implied by the tool name and described behavior.

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.