Skip to main content
Glama

get_thread_budget

Read-onlyIdempotent

Retrieve a thread's budget caps and accumulated usage across tokens, cost, turns, and time, so you can check remaining spend or confirm whether any limits are set.

Instructions

Read a thread's budget envelope with the usage accumulated against it. The max_ fields (tokens, usd_micros where $1 is 1,000,000, turns, wall_secs) are null when that dimension has no cap, and the used_ fields include tokens, usd_micros, turns, wall_secs and the input, output and cache token splits. Returns null when no budget was set and no usage has been reported. Set caps with set_thread_budget or update_thread_budget, and record usage with report_usage; usage_rollup aggregates spend across a workspace, thread or member. Requires workspace:read and read access to the thread's channel.

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": {
      "thread_id": "<thread_id>"
    },
    "name": "get_thread_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
thread_idYesUUID of the thread whose budget to read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv479.0.2
    • addedInput schema / properties / thread_id / description
      Added value: +"UUID of the thread whose budget to read."
  2. First observedv479.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the bar is lower, yet the description still adds substantive behavior: max_ fields are null when a dimension is uncapped, usd_micros is scaled at $1 = 1,000,000, the used_ fields include input/output/cache token splits, and the tool returns null when no budget or usage exists. It also discloses the required workspace:read scope and channel read access, which is exactly the permission context annotations cannot express.

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 the core action, then return semantics, then sibling routing and permissions, so the important information comes first. The middle sentence is a long run-on packing units, field lists, and null semantics, which is dense but each clause still carries distinct information.

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 one-parameter read tool with no output schema, the description supplies what the structured fields cannot: the shape of the returned envelope, the null-vs-uncapped distinction, and the auth prerequisites. Nothing an agent needs in order to call it and interpret the result is missing.

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?

The single parameter, thread_id, is fully documented in the schema at 100% coverage, and the description adds no format, constraint, or sourcing detail beyond it. With coverage this high the schema carries the load, so baseline 3 applies.

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 ('Read a thread's budget envelope with the usage accumulated against it'), which is clearly distinct from the mutation siblings it names (set_thread_budget, update_thread_budget) and from the aggregate sibling (usage_rollup). An agent can place this tool without opening any schema.

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

Usage Guidelines5/5

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

Explicitly routes the agent: use this to read, set_thread_budget/update_thread_budget to set caps, report_usage to record usage, and usage_rollup for cross-workspace/thread/member spend aggregation. That is a genuine when-to-use-vs-alternative mapping rather than an implied one.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools