Skip to main content
Glama

optimize_context_batch

Builds a code knowledge graph once, then compresses context for each of multiple queries, reducing token usage by 80-90%.

Instructions

One parse, many queries. Builds graph once, runs slurp+compress per query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codebase_pathYes
queriesYes
token_budgetNo
Behavior2/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. It mentions building a graph once and performing 'slurp+compress' per query, but does not clarify side effects (e.g., caching, data persistence), resource consumption, error handling, or whether the operation is read-only or destructive. The term 'slurp+compress' is undefined.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise (one short sentence), which is good for brevity. However, it uses jargon ('slurp+compress') without explanation, which may confuse an agent. The structure is front-loaded but lacks detail on parameters and use cases.

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

Completeness2/5

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

Given the tool's complexity (3 parameters, 0% schema coverage, no output schema, 19 siblings), the description is insufficient. It does not explain return values, error behavior, or how to use the 'token_budget' parameter. An agent would likely need to guess or experiment to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no meaning to any of the three parameters. Schema description coverage is 0%, and the description does not mention 'codebase_path', 'queries', or 'token_budget'. It fails to explain how these parameters influence the tool's behavior, leaving the agent without guidance.

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 clearly states the core functionality: 'One parse, many queries' and 'Builds graph once, runs slurp+compress per query'. It effectively conveys that this tool performs batch processing across multiple queries on a single parsed codebase. The mention of 'slurp+compress' is jargon but understandable in context. It distinguishes itself from siblings like 'optimize_context_tool' by implying batch processing.

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?

The description provides no explicit guidance on when to use this tool versus its siblings or other tools. It does not mention scenarios, prerequisites, or exclusions. The batch nature is implied but not directly compared to single-query variants. An agent would need to infer usage context from the tool name and siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/likhithreddy/fittok'

If you have feedback or need assistance with the MCP directory API, please join our Discord server