Skip to main content
Glama

Model Ruler — AI Cost Calculators

context-window-planner

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

TableJSON 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.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It conveys that this is an analytical/advice operation and enumerates the strategies it can recommend, but says nothing about side effects, defaults applied (overhead 2000 / output 1000), or what the verdict looks like. For a stateless calculator the risk is low, but the disclosure is thin.

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 that leads with the trigger condition and packs both the fit-check and strategy-recommendation purposes with zero filler.

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?

There is no output schema, and the description never states what the tool returns (a boolean verdict, a token headroom number, a ranked strategy list). With five parameters and no annotations or output contract, the definition leaves the agent guessing about the response shape even though the schemas cover inputs well.

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%, so the schema already documents all five parameters including defaults and the strategy enum. The description only loosely mirrors the inputs ('document plus prompt plus output') without adding format or precedence rules beyond the schema, 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 states a specific capability: determining whether a document plus prompt plus output fits a model's context window, and returning a strategy recommendation from a named set (truncate/summarize/rag/chunk). That is concrete and distinguishable from the cost-calculator siblings, though no sibling is named explicitly for contrast.

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 opens with an explicit 'Use when...' trigger covering two conditions: a fit check and a strategy recommendation. There is no statement of when NOT to use it or which sibling to pick instead, so the routing guidance is clear but not complete.

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