Skip to main content
Glama

Measure a config file

measure_config

Measure token usage for every MCP server in a config file (Claude Desktop, Cursor, VS Code, Windsurf) by starting each as the client would and reporting per-server and total costs.

Instructions

Measures every server in an MCP config file (.mcp.json, Claude Desktop, Cursor, VS Code or Windsurf format): starts each one the way the client would and reports tokens per server and in total.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the config file
windowNo
noStdioNoMeasure remote servers only, do not start local ones

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose a key side effect that is not visible in the schema: it 'starts each one the way the client would,' i.e. it spawns server processes. It also states what is reported (tokens per server and in total). It omits failure behavior when a server cannot start, timeouts, and whether spawned processes are cleaned up.

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?

A single front-loaded sentence: verb and scope come first, the supported formats and the output shape follow. It is dense but every clause earns its place; only the parenthetical format list makes it slightly heavy for one sentence.

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?

Good coverage of the return content despite no output schema, and the config-format enumeration is useful. But with no annotations and a partially documented schema, the description should say more about what happens when a server fails to start, how long measurement takes, and what 'window' controls.

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 67%: 'path' and 'noStdio' are documented in the schema, but 'window' has no description anywhere and the description does not explain it. The description does add value by naming which client formats the path may point to, but it adds nothing for the two undocumented-behavior parameters beyond the schema.

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?

States a specific verb ('Measures') and resource ('every server in an MCP config file'), and enumerates the supported config formats, which tells the agent exactly what input to supply. The phrase 'every server' implicitly distinguishes it from the singular measure_server sibling, but it never names or contrasts that 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 Guidelines3/5

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

Usage is implied by the scope: use this when you have a whole config file rather than a single server. However, there is no explicit when-to-use/when-not guidance and no reference to measure_server for the single-server case, leaving the agent to infer the selection rule from scope alone.

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