Skip to main content
Glama

ck_budget

Estimate, commit, or check agent operation costs against session budgets. Use before expensive multi-agent work or large model calls to control spending.

Instructions

Estimate, record, or check the cost of an agent operation against session and daily spend budgets. Three modes: estimate (read-only, returns headroom and projected cost); commit (write — deducts estimated_cost_cents from the session budget); status (read-only, returns remaining budget). For commit mode: pass session_id, estimated_cost_cents, provider, model, input_tokens, and output_tokens. Pass include_token_overhead: true with project_root to attach a token overhead audit (rule files, skill duplicates, tool schemas) to the response. Check ck_budget before expensive multi-agent work or large model calls. Use ck_cost_optimizer for model price comparisons without recording spend.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cached_input_tokensNoNumber of tokens served from cache.
estimated_cost_centsNoEstimated cost of the operation in US cents.
include_token_overheadNoWhen true, attach a token overhead summary (rule files, skill duplicates, tool schemas) to the response.
input_tokensNoNumber of input (prompt) tokens consumed.
metadataNoArbitrary key-value metadata for extensibility and audit context.
modeNoOperation mode that determines the tool behavior and return shape.
modelNoAI model identifier (e.g., gpt-4, claude-sonnet-4.6).
output_tokensNoNumber of output (completion) tokens generated.
project_rootNoAbsolute path to project root. Required when include_token_overhead is true.
providerNoAI provider name (e.g., openai, anthropic, ollama).
session_idYesUnique session identifier for correlating findings, proofs, budget, and audit trail.
sourceNoSource system or component that triggered the cost.
task_idNoTask identifier within the session for scoped operations.
toolNoSpecific tool or operation that incurred the cost.
Behavior5/5

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

Clearly discloses that estimate and status modes are read-only, while commit mode is a write operation that deducts from session budget. Also mentions the optional token overhead audit. With no annotations present, the description fully covers behavioral traits.

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?

Five well-structured sentences, front-loaded with purpose and modes. No wasted words or filler.

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

Completeness4/5

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

For a tool with 14 parameters and no output schema, the description covers all modes and parameter usage. Minor gap: does not explicitly state what commit mode returns (presumably a success indicator). Overall, fairly complete.

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 baseline is 3. Description adds value by specifying which parameters are required for commit mode and explaining the dependency between include_token_overhead and project_root. However, many parameters are self-explanatory from schema.

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?

The description clearly states three distinct modes (estimate, commit, status) with specific verbs and resources. It distinguishes from the sibling ck_cost_optimizer by noting that tool is for model price comparisons without spend recording.

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 states when to use: 'Check ck_budget before expensive multi-agent work or large model calls.' Also mentions when not to use: 'Use ck_cost_optimizer for model price comparisons without recording spend.'

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aryaminus/controlkeel'

If you have feedback or need assistance with the MCP directory API, please join our Discord server