Skip to main content
Glama

cost

Calculate context cost in lines for a feature's flow to determine if it fits within constraints before starting development work.

Instructions

Total context cost (lines) for a feature's flow. Shows per-file line counts. Use before starting work to know if the feature fits in context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
featureYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the tool 'shows per-file line counts' and is for cost estimation, but lacks details on behavioral traits like whether it's read-only (implied but not stated), performance characteristics, error handling, or output format. The description doesn't disclose critical aspects like whether it requires specific permissions or has rate limits.

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?

The description is two concise sentences with zero waste: the first states the purpose and output, the second provides usage timing. It's front-loaded with the core functionality and efficiently structured, making every sentence earn its place.

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?

Given the tool has an output schema (which should cover return values), the description doesn't need to explain outputs. However, with no annotations and low parameter coverage, it lacks completeness on behavioral aspects and parameter details. The description is adequate for a simple estimation tool but has clear gaps in transparency and semantics.

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?

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It implies the 'feature' parameter is used to identify the feature for cost calculation, but doesn't explain what constitutes a valid feature, expected format, or examples. The description adds minimal meaning beyond the schema's basic structure, meeting the baseline for low coverage without fully compensating.

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 tool calculates 'Total context cost (lines) for a feature's flow' and 'Shows per-file line counts', which specifies the verb (calculate/show) and resource (context cost/line counts). It distinguishes from siblings by focusing on cost estimation rather than analysis or generation tools like 'generate' or 'flow'. However, it doesn't explicitly differentiate from all siblings (e.g., 'bloat_report' might also involve cost-related reporting).

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?

The description provides clear context for when to use it: 'Use before starting work to know if the feature fits in context.' This gives practical guidance on timing and purpose. However, it doesn't specify when NOT to use it or name explicit alternatives among the sibling tools, though the context implies it's for pre-work assessment rather than during or after work.

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/James-Chahwan/repo-graph'

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