Skip to main content
Glama

cost-blocks

Track Claude Code cost in 5-hour blocks with gap detection. Returns started_at, ended_at, total_usd, by_model, and entry_count for each window.

Instructions

Custo Claude Code por janelas deslizantes de 5h com gap detection (entries separadas por >5h iniciam novo bloco — pattern ccusage). Retorna blocks[] com started_at, ended_at, total_usd, by_model, entry_count, is_active + shape canônico agregado. Triggers: "custo por bloco", "5h windows", "blocks cost", "ccusage blocks". Use cost-today para dia, cost-session para sessão.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
config_dirsNo
tzNo
refresh_pricingNo
persistNo
projectRootNo
Behavior4/5

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

The description explains the algorithm (gap detection, 5h windows) and output shape, which is sufficient for a read-only compute tool. However, it lacks explicit statement about not modifying data or behavioral side effects; with no annotations, some minor gaps exist.

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

Conciseness4/5

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

The description is relatively concise, includes key behavior, and front-loads the purpose. It includes trigger phrases which add slight redundancy but are acceptable. It could be more structured but overall efficient.

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 5 undocumented parameters, no output schema, and sibling tools, the description is incomplete. It fails to specify parameter roles, and the return shape description ('shape canônico agregado') is vague. The agent lacks information for correct invocation.

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?

Schema description coverage is 0%, and the description does not explain any of the 5 parameters (config_dirs, tz, refresh_pricing, persist, projectRoot). The agent has no guidance on what these parameters do, making correct invocation impossible.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool computes Claude Code cost by sliding 5h windows with gap detection, returns blocks with specific fields, and distinguishes from siblings by advising to use cost-today for day and cost-session for session. The verb and resource are clear, and trigger phrases help discovery.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance: for block-based cost analysis with sliding windows. It also names alternative tools (cost-today, cost-session) for different granularities, effectively telling when not to use this tool.

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/luanpdd/kit-mcp'

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