Skip to main content
Glama

trace_count

Read-only

Counts rows in selected .trace tables, overall and per process, to reveal which tables contain data before reading and flag empty tables that need another instrument.

Instructions

Counts the rows of several tables of a kept .trace, in all and per process, so a recording's useful tables show before reading them: a table with 0 rows needs another instrument or Xcode, not a bigger page.

Input Schema

NameRequiredDescriptionDefault
traceYesa run name from perf_runs whose trace_kept is true, or the path of a .trace
tablesNotable names from trace_tables; default the tables that matter for a translation layer

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.10.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "type": "object"
      +}
  2. Addedv0.7.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real behavioral context — counts are aggregated both globally and per process, and zero counts mean a different tool/Xcode is needed — but says nothing about cost, trace size limits, or failure modes when a trace is missing.

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?

One sentence, front-loaded with the verb and object, and the rationale clause earns its place by explaining what the counts are for. Only minor cost is the slightly convoluted trailing clause.

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?

Two well-described params, an output schema that carries the return shape, and annotations covering safety — the description supplies the one thing structured fields can't: the interpretive rule that zero rows means a different instrument. Complete enough to call correctly.

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 100%: the trace param already documents the run-name-or-path forms and tables already points at trace_tables with its default. The description adds no parameter-level detail beyond that, so the baseline 3 applies.

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: counts rows of tables in a kept .trace, both overall and per process. The triage framing ("so a recording's useful tables show before reading them") makes it distinguishable from the table-listing and querying siblings, though it never names them explicitly.

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?

"so a recording's useful tables show before reading them" plus the 0-row guidance gives a clear posture: run this as a cheap pre-check before querying, and treat zero-row tables as a signal to switch instruments rather than retry with a larger page. No explicit exclusion or named alternative (trace_query) is given, so it stops short of a 5.

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