Skip to main content
Glama

KARTA — spend control for AI agents

Check a spend against a task envelope

check_spend
Read-onlyIdempotent

Check whether a proposed agent spend is inside a task envelope. Returns verdict, rule, reason, counterfactual and next. No state is stored.

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": {
      "envelope": "<envelope>",
      "amount": "<amount>",
      "payee": "<payee>"
    },
    "name": "check_spend"
  }
}

Input Schema

NameRequiredDescriptionDefault
payeeYes
amountYes
envelopeYes
calls_so_farNo
spent_so_farNo0
is_subscriptionNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3/5.0
Behavior3/5

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

The annotations already declare read-only, idempotent, non-destructive, closed-world behavior. The description adds useful behavioral context by stating "No state is stored" and naming the returned verdict fields, but it does not discuss permissions, failure modes, or how the check relates to actual spend execution.

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?

Two short sentences, front-loaded with the core purpose and followed by return and state behavior. There is no filler or repetition.

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?

The tool has six parameters, a nested object, defaults, and no schema descriptions, yet the description provides almost no parameter guidance. The output schema covers return values, but the description leaves too much unspecified for an agent to call this complex check correctly.

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

Parameters2/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 compensate for six undocumented parameters, including a nested envelope object and two running-total fields. It only gestures at envelope and amount conceptually, and says nothing about payee, amount format, calls_so_far, spent_so_far, or is_subscription.

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?

The description states a specific verb and resource: checking a proposed agent spend against a task envelope. It clearly distinguishes evaluation from sibling envelope-management tools like get_envelope and kill_envelope, though it does not explicitly name those siblings or policy_rules as an alternative.

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?

It implies use before committing a proposed spend, but gives no explicit when-to-use guidance, no exclusions, and no comparison to sibling tools such as policy_rules or get_envelope. An agent must infer the calling context from the tool name alone.

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.