Skip to main content
Glama

Set auto-recharge

set_auto_recharge
Destructive

Turn auto-recharge on or off and set when it charges the saved default card: when the balance falls below threshold_usd, it tops up to target_usd. threshold_usd and target_usd are required even to turn it off. Needs the billing permission on this sign-in and a workspace owner or manager behind it; target_usd cannot exceed this sign-in's daily top-up cap (TOPUP_CAP_REACHED), and with no saved card the answer is NO_PAYMENT_METHOD. Returns the settings as get_auto_recharge does.

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": {
      "enabled": "<enabled>",
      "threshold_usd": "<threshold_usd>",
      "target_usd": "<target_usd>"
    },
    "name": "set_auto_recharge"
  }
}

Input Schema

NameRequiredDescriptionDefault
enabledYestrue to turn auto-recharge on, false to turn it off
workspaceNoWorkspace ID (optional: defaults to the authenticated workspace)
target_usdYesTop up to this balance, in USD: 50 to 10000, above threshold_usd
environmentNoEnvironment name (optional: defaults to the environment this session acts in)
threshold_usdYesTop up when the balance falls below this, in USD: 20 to 5000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

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 (destructiveHint=true, readOnlyHint=false) by naming the two failure modes (TOPUP_CAP_REACHED, NO_PAYMENT_METHOD), the permission prerequisites, and the cap constraint on target_usd. It also defines what the call actually does to the card on file and the settings that persist.

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-loads the action and the charging logic, then prerequisites, then error outcomes — a sensible ordering for a single dense paragraph. Slightly run-on, with the permission clause packed into one long sentence, but no redundant content.

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?

No output schema exists, yet the description covers the return shape by reference to get_auto_recharge, and it discloses permissions, caps, failure codes, and required-even-when-disabled semantics. An agent has everything needed to call or fail gracefully.

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 still adds value by explaining the threshold/target relationship (top up to target when balance drops below threshold) and stressing that both remain required when disabling — a non-obvious behavioral rule the schema's 'required' array alone does not motivate.

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 ('Turn auto-recharge on or off and set when it charges the saved default card') and immediately defines the charging semantics. Clearly distinguishable from sibling get_auto_recharge (read) and top_up (one-off charge).

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 conditions for use: it requires billing permission plus a workspace owner/manager, and notes that threshold_usd and target_usd are mandatory even when disabling. It stops short of explicitly naming when to prefer top_up or get_auto_recharge, though the read counterpart is implied by 'Returns the settings as get_auto_recharge does.'

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.