Skip to main content
Glama

Model Ruler — AI Cost Calculators

Context Window Planner

context-window-planner
Read-onlyIdempotent

Use when a user needs to know whether a document plus prompt plus output fits within a model's context window, or wants a strategy recommendation (truncate/summarize/rag/chunk).

Input Schema

NameRequiredDescriptionDefault
doc_tokensYesPrimary document/content tokens
strategy_hintNoPreferred strategy (optional)
overhead_tokensNoSystem prompt + few-shot + history (default 2000)
expected_out_tokensNoReserved output budget (default 1000)
model_context_windowYesTarget model context size

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered and the description does not contradict it. However, the description adds no behavioral context beyond that (e.g., that results are deterministic estimates rather than billing guarantees), so it earns only the baseline.

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?

A single front-loaded sentence with zero filler; the two trigger conditions come before the parenthetical strategy list, so the most important routing information is read first.

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?

With five well-documented parameters, full annotations, and no output schema, the description is nearly self-sufficient: it signals both the fit-check and the strategy-recommendation outputs. It could be stronger by clarifying that results are token-budget estimates, but nothing critical for correct invocation 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?

Schema description coverage is 100%, with every parameter including defaults (overhead 2000, output 1000) and the enum documented in the schema itself. The description merely restates the concepts of document, prompt, and output and repeats the four strategy names, adding no syntax or semantic detail beyond the schema.

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 names a concrete capability: determining whether document+prompt+output fit a model's context window and recommending a strategy. That is a specific verb-and-resource statement, but it never distinguishes this tool from close siblings like token-counter or rag-pipeline-cost-calculator, which an agent could easily confuse it with.

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

Usage Guidelines4/5

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

It gives two explicit triggering conditions ('needs to know whether ... fits' and 'wants a strategy recommendation'), which is clear when-to-use guidance. It offers no when-not or named alternative, so it falls short of full routing guidance.

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.

Resources