Skip to main content
Glama

set_spend_limits

Idempotent

Set or remove hard spend limits in credits per UTC day and per UTC month. Calls that would go past a limit are refused (402 spend_limit) until it resets. Pass 0 or null to remove a limit; omit a field to leave it unchanged. Emails go out at 50/80/100% of the monthly limit.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "set_spend_limits"
  }
}

Input Schema

NameRequiredDescriptionDefault
daily_limitNoCredits per UTC day; 0 or null removes it.
monthly_limitNoCredits per UTC month; 0 or null removes it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing enforcement behavior (requests exceeding a limit are refused with 402 spend_limit until reset) and side effects (notification emails at 50/80/100% of the monthly limit). This is exactly the kind of consequence information an agent needs before mutating a billing control.

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

Conciseness5/5

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

Four short sentences, each carrying distinct information: what the tool does, enforcement consequence, removal/omission semantics, and notification thresholds. The core action is front-loaded with no filler.

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?

With only two optional numeric parameters and no output schema, the description covers everything an agent needs: units, reset windows, update vs removal semantics, failure mode, and side-effect emails. Nothing material is left unspecified.

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, but the description adds partial-update semantics not present in the schema: omitting a field leaves it unchanged, which is essential for interpreting a 0-required-parameter tool. Units and reset behavior (UTC day/month) are also restated usefully.

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 pair (set/remove) plus the exact resource and unit: hard spend limits in credits per UTC day and per UTC month. No sibling tool deals with spend limits, so the resource alone differentiates it from get_billing, get_balance, and the key-management tools.

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: pass 0 or null to remove a limit, omit a field to leave it unchanged. It does not name an alternative tool or an explicit when-not-to-use condition, but no sibling overlaps this capability, so the remaining gap is small.

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