Skip to main content
Glama

Set spend limit

set_spend_limit
Idempotent

Cap how much of the tenant's credit pool a specific user or agent may spend per day/month/total.

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": {
      "spender_type": "<spender_type>",
      "spender_id": "<spender_id>",
      "period": "<period>",
      "limit_micro": "<limit_micro>"
    },
    "name": "set_spend_limit"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodYes
spender_idYes
enforcementNo
limit_microYes
spender_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is mostly covered. The description adds that the cap applies to a shared tenant credit pool and is period-scoped, which is genuinely useful context. It does not say whether an existing limit is overwritten, whether it applies retroactively to already-incurred spend, or what happens when the limit is hit under warn mode.

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?

A single front-loaded sentence with no filler; the scope qualifier (tenant credit pool, per spender, per period) arrives before any subordinate detail.

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

Completeness2/5

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

For a five-parameter, four-required mutation tool with an unset output schema and zero schema description coverage, the description is too thin. It omits enforcement behavior, limit precedence/overwrite rules, and authorization requirements, which an agent needs before calling this safely.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must carry all parameter meaning; it covers spender_type (user/agent), period (day/month/total) and roughly limit_micro ('how much'). It leaves the enforcement enum (block vs warn) entirely undecoded and never clarifies the micro unit convention for limit_micro, so two of five parameters remain semantically opaque.

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

Purpose4/5

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

Names a specific verb (cap) and resource (spend limit) with explicit scope: tenant credit pool, per user or agent, per day/month/total. The name plus scope cleanly separates it from remove_spend_limit and list_spend_limits, though it never states that distinction outright.

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

Usage Guidelines2/5

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

No when-to-use or when-not-to-use guidance, no mention of prerequisites (e.g. admin rights), no reference to the sibling remove/list tools, and no guidance on when to prefer enforcement=block vs warn. The reader must infer all of this from the one-line purpose.

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