Skip to main content
Glama

Code coverage

coverage
Read-only

Measure unused CSS and JavaScript per file: start recording, exercise the page, then stop to identify code that was not used.

Instructions

Measures unused CSS and JavaScript per file like the DevTools Coverage panel. Call with action "start", exercise the page, then "stop". CSS coverage always works; JavaScript coverage needs the full DevTools channel.

Input Schema

NameRequiredDescriptionDefault
limitNoShow at most this many files (default 30).
tabIdNoTab to act on. Defaults to the session target tab (see tab_select).
typesNoWhat to measure (default both).
actionYesStart or stop measuring.
reloadNoReload the page right after starting, to cover page load (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=false, and the description adds a meaningful caveat beyond them: JS coverage needs the full DevTools channel. No contradiction with the read-only hint, since it's a measurement session, not page mutation. Slightly more could be said about what a stopped session returns.

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?

Three tight sentences, front-loaded with the purpose followed by the actionable workflow and the one important constraint. No filler.

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?

No output schema exists, but the limit parameter ('show at most this many files') implies a ranked file list return, which is adequate. The start/exercise/stop workflow plus the JS caveat give an agent enough to invoke it correctly; only return-shape detail is left implicit.

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 description coverage is 100%, so limit, tabId, types, action, and reload are all documented in the schema. The description's start/stop workflow maps to the action parameter but adds no syntax or format detail beyond that. Baseline 3 is appropriate.

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 and resource: measures unused CSS and JavaScript per file, explicitly analogized to the DevTools Coverage panel. A distinct purpose from siblings like perf_metrics/perf_trace, though it doesn't name those alternatives to sharpen the boundary.

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 workflow: call action 'start', exercise the page, then 'stop'. It also flags a precondition – JavaScript coverage requires the full DevTools channel while CSS always works. Clear usage context, though it doesn't contrast with sibling tools.

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