Skip to main content
Glama

simulate_context_budget

Simulates multi-turn context-window growth and LLM cost economics to calculate schema tax, compaction turn, cache savings, and monthly USD impact for agent sessions.

Instructions

Deterministic multi-turn agent context-window and cost economics simulator. Computes exact MCP schema tax, turn-by-turn token growth, Lost-in-the-Middle degradation cliff turn, 85% compaction wall turn, prompt-cache economics, and monthly USD savings across 8 frontier models.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "simulate_context_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoTarget LLM pricing & context window preset (default: claude-sonnet-4).
turnsNoConversation turns per session (1..100, default: 20).
mcpToolCountNoNumber of eagerly attached MCP tools (default: 25).
sessionsPerDayNoDaily agent sessions for monthly cost projection (default: 50).
ragContextTokensNoInitial retrieved context tokens (default: 6000).
systemPromptTokensNoStatic system/AGENTS.md prompt tokens (default: 2500).
promptCachingEnabledNoModel prompt caching discount on prefix turns (default: true).
avgTokensPerToolSchemaNoAverage tokens per tool JSON schema (default: 220).
expectedCompressionRatioNoExpected tool-output compression ratio 0.1..0.9 (default: 0.68).
avgToolOutputTokensPerTurnNoAverage raw tool output tokens appended each turn (default: 3500).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses 'Deterministic', implying reproducible, computation-only behavior with no external model calls, and states coverage of 8 models. It does not confirm side-effect freedom, whether it reads any live data, or runtime characteristics.

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?

A single front-loaded sentence with no filler; the computed-output list is long but each item conveys a distinct capability. It is dense rather than padded, though it reads as a spec dump rather than guidance.

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?

The enumeration of computed outputs substitutes well for the missing output schema, and all 10 optional parameters are fully documented in the schema. What remains unstated is how results are returned and how this fits into a broader context-optimization workflow.

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 100% and every parameter carries a default and range, so the schema already documents all 10 inputs. The description adds only the '8 frontier models' framing that explains the model enum, which is baseline-level value rather than new semantic detail.

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?

States a specific resource and computation set: 'Deterministic multi-turn agent context-window and cost economics simulator' with enumerated outputs (schema tax, token growth, degradation cliff, compaction wall, cache economics, USD savings). That resource is clearly distinct from the compression/packing siblings, though no sibling is named to make the differentiation explicit.

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?

There is no when-to-use or when-not-to-use guidance and no named alternative. An agent must infer from the purpose sentence alone that this is a planning/estimation tool rather than an actual context-reduction operation like compress_logs_and_traces or compile_context_pack.

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