Skip to main content
Glama

profiler-commit-query

Query React commit data by component, time range, or index to investigate render performance. View cascade trees to trace which parent triggered each commit.

Instructions

Query React commit data for iterative investigation of render performance. Requires react-profiler-stop to have been called first. Modes:

  • by_component: All commits where a specific component rendered, with causes and durations.

  • by_time_range: What happened in a specific time window.

  • by_index: Full detail dump of a single commit (all components, props changed, parent cascade).

  • cascade_tree: Parent-child cascade tree for a commit showing who triggered whom. Use when drilling into specific components or time windows after react-profiler-analyze. Returns a markdown table or tree of commit data matching the requested mode. Fails if react-profiler-stop has not been called or no commit data is stored.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesQuery mode: by_component (commits for a component), by_time_range (commits in a window), by_index (full detail for one commit), cascade_tree (parent-child cascade for a commit)
portNoMetro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id.
top_nNoMax results to return. Defaults to 20 for by_component / by_time_range, which count commits. by_index counts individual fibers and returns all of them unless this is set, because one commit's fibers collapse to far fewer distinct components — a small cap there can show less than the analyze report it is meant to expand on.
device_idYesDevice logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId).
commit_indexNoCommit index for by_index and cascade_tree modes
time_range_msNoTime range filter for by_time_range mode
component_nameNoComponent name for by_component mode

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.25.0
    • removedInput schema / properties / port / default
      Removed value: -8081
    • changedInput schema / properties / port / description
      Previous value: -"Metro server port"New value: +"Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id."
    • addedInput schema / properties / port / maximum
      Added value: +65535
    • addedInput schema / properties / port / minimum
      Added value: +1
    • changedInput schema / properties / port / type
      Previous value: -"number"New value: +"integer"
  2. Changed5 schema fields changedv0.22.0
    • addedInput schema / properties / device_id / minLength
      Added value: +1
    • changedInput schema / properties / time_range_ms / properties / end / description
      Previous value: -"End of range in ms (performance.now clock)"New value: +"End of range in ms since profiling started — the same clock profiler-commit-query prints"
    • changedInput schema / properties / time_range_ms / properties / start / description
      Previous value: -"Start of range in ms (performance.now clock)"New value: +"Start of range in ms since profiling started — the same clock profiler-commit-query prints"
    • removedInput schema / properties / top_n / default
      Removed value: -20
    • changedInput schema / properties / top_n / description
      Previous value: -"Max results to return (default 20)"New value: +"Max results to return. Defaults to 20 for by_component / by_time_range, which count commits. by_index counts individual fibers and returns all of them unless this is set, because one commit's fibers collapse to far fewer distinct components — a small cap there can show less than the analyze report it is meant to expand on."
  3. First observedv0.15.0

TDQS

A4.3/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 it does well by disclosing the required prior call, failure conditions, and the markdown table/tree return format. It implies a non-mutating query operation, though it does not explicitly state that it leaves profiling state unchanged.

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 well-structured with a front-loaded purpose and a clean bulleted mode list. The only minor flaw is redundancy: "Requires react-profiler-stop to have been called first" is restated in the final failure sentence.

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?

Given seven parameters, nested objects, no annotations, and no output schema, the description covers prerequisites, failure behavior, output shape, and mode semantics well. It does not explicitly state that certain mode-specific parameters like commit_index or time_range_ms are expected for their modes, which is a small but real completeness gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, which puts this at baseline 3, but the top-level mode descriptions add meaning beyond the schema by specifying what each mode reveals: causes and durations, props changed, and parent-child cascade relationships. The schema still carries most parameter detail, so this is not a 5.

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 opens with a specific verb and resource: "Query React commit data for iterative investigation of render performance." It then enumerates four distinct query modes, making it clear what the tool is for and how it differs from broader profiling tools like react-profiler-analyze.

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?

It explicitly says to use this tool when drilling into specific components or time windows after react-profiler-analyze, and states the hard prerequisite that react-profiler-stop must have been called first. It does not explicitly name exclusions or alternative sibling tools, but the usage context is clear.

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