Skip to main content
Glama

simulate_agent_session_cost

Read-onlyIdempotent

Simulate 1–100-turn coding agent sessions to project monthly token spend and compare baseline vs pruned context across cache TTLs, idle gaps, screenshot cliffs, and nine LLM pricing tiers.

Instructions

Simulate 1..100 turn O(T^2) coding agent session and monthly token spend across 5m/1h prompt-cache TTLs, pause gaps, and mid-session screenshot cache-bust cliffs across 9 published LLM pricing tiers.

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_agent_session_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
turnsNoNumber of turns per coding session (1..100).
modelIdNoReference LLM pricing tier ID (comparing baseline vs pruned/warm-cache trajectories across all 9 models).claude_sonnet_4_5
compactTurnNoOptional explicit /compact turn for the optimized trajectory (auto-computed when omitted).
imageTokensNoToken weight of mid-session visual attachments injected at imageInjectionTurn.
cacheTtlModeNoPrompt-cache retention window (5m standard ephemeral cache, 1h extended cache, or none).5m
includeTurnLogNoWhen true, includes turn-by-turn accounting arrays for both baseline and optimized runs.
avgOutputTokensNoAverage assistant output tokens generated per turn.
mcpSchemaTokensNoBaseline eager MCP JSON Schema tokens injected on every turn.
sessionsPerMonthNoMonthly coding session count used for monthly USD/CNY budget projections.
avgTurnGapMinutesNoAverage idle pause between turns in minutes (>5m triggers 5m cache TTL expiration).
prunedRulesTokensNoOptional target rules token count after deduplication and moving code blocks to on-demand docs.
systemRulesTokensNoBaseline static instruction tokens per turn (CLAUDE.md, AGENTS.md, .cursorrules).
imageInjectionTurnNoTurn number (1..100) where screenshots/images are pasted mid-session (0 = no image cliff).
avgTurnGrowthTokensNoAverage new user prompt + tool output context added per turn.
optimizedGapMinutesNoTarget turn pause in minutes for the optimized trajectory (defaults to <=2.8m warm window).
prunedMcpSchemaTokensNoOptional target MCP schema token count after disabling unused eager MCP servers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), and the description adds real modeling context: O(T^2) growth, 5m/1h cache TTL expiry from pause gaps, and mid-session screenshot cache-bust cliffs. It stops short of describing the returned projections or their units, which matters since no output schema exists.

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, though the clause density and jargon ("cache-bust cliffs", "O(T^2)") make it heavier to parse than necessary for a 16-parameter tool.

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

Completeness3/5

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

For a 16-parameter simulation with no output schema, the description explains what is modeled but not what comes back — the baseline-vs-optimized comparison, projection units, or whether turn logs are returned. Adequate but leaves a meaningful gap.

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 coverage is 100%, so every one of the 16 parameters is already documented in the schema. The description's mentions of TTLs, pause gaps, and image cliffs mirror those same fields rather than adding new interpretation, so the baseline of 3 applies.

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 opens with a specific verb ("Simulate") and a concrete resource (multi-turn coding agent session cost plus monthly token spend), and enumerates the modeled variables (cache TTLs, pause gaps, image cliffs, 9 pricing tiers). It is distinguishable from the audit siblings, though it never explicitly contrasts itself with them.

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 statement of when to reach for this simulation versus audit_instruction_bloat, audit_mcp_schema_tokens, or find_optimal_compact_turn, nor any prerequisites or exclusions. The agent must infer the use case from the topic alone.

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