Skip to main content
Glama

TokenBudget

Check which models' context windows fit an input

check_context_fit
Read-onlyIdempotent

Say which models can take this input plus the output you want to reserve, which cannot, and which do not publish a context window. Use before sending a very large document or conversation.

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": "check_context_fit"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoPrompt text. Counted with an estimator, never stored.
modelsNoModel ids to compare, e.g. ["claude-sonnet-5-5", "gpt-6.2-sol", "gemini-3.8-flash"]. Omit to compare every listed model. list_models gives every id.
systemNoSystem prompt text.
messagesNoChat messages [{role, content}]. Counted with an estimator, never stored.
providersNoOnly these providers.
input_tokensNoExact input token count, if you have it. Overrides text and gives an exact cost.
reserve_output_tokensNo

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 cover read-only, idempotent, closed-world behavior, so the bar is lower. The description does add one useful behavioral fact beyond them: results are tri-state, including models with no published window, which prevents misreading the output. It says nothing about how the input is measured or whether anything is stored, leaving that to the schema.

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?

Two sentences, no filler, and the capability statement leads before the usage cue. Every clause carries information the agent needs.

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 no output schema, the description must sketch return values, and it does so via the three result categories. Minor gaps remain: it doesn't state that results are per-model or how counts are estimated, but nothing essential to 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 coverage is 86%, so parameters are largely documented already; baseline is 3. The phrase 'the output you want to reserve' is the only place reserve_output_tokens is explained, since the schema gives it no description, which is a slight but real addition over the structured fields.

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?

Names a specific action (report which models fit an input, which don't, and which publish no context window) against a concrete resource (model context windows). The tri-state framing distinguishes it clearly from count_tokens or estimate_cost, though it never names a sibling explicitly.

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?

Gives an explicit trigger: 'Use before sending a very large document or conversation.' That is clear context for selection. It stops short of naming alternatives or exclusions, so it misses the 5 mark.

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