Skip to main content
Glama

profiler-commit-query

Read-only

Query React commit data to investigate render performance by component, time range, commit index, cascade tree, or re-render counts.

Instructions

Query React commit data for iterative investigation of render performance. Modes:

  • by_component: All commits where component_name rendered, with causes and durations.

  • by_time_range: What happened in time_range_ms.

  • by_index: Full detail dump of the commit at commit_index (all components, props changed, parent cascade).

  • cascade_tree: Parent-child cascade tree for the commit at commit_index, showing who triggered whom.

  • render_counts: Re-render count, rate and self time per component over ALL commits, including those under 16ms that the other modes cannot see. Library components included. 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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "device_id": "<device_id>",
      "mode": "<mode>"
    },
    "name": "profiler-commit-query"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesQuery mode; see Modes in the tool description.
portNoMetro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. Range: 1 to 65535.
top_nNoMax results to return. Defaults to 20 for by_component / by_time_range, which count commits, and render_counts, which counts components. by_index counts individual fibers and returns all of them unless this is set; a small cap there can show less than the analyze report it is meant to expand on. Must be greater than 0.
device_idYesDevice ID used to record or load the React profile.
commit_indexNoCommit index
time_range_msNoTime range in ms since profiling started, the clock this tool prints
component_nameNoComponent name; optional for render_counts, which it narrows to one component

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • changedInput schema / properties / commit_index / description
      Previous value: -"Commit index for by_index and cascade_tree modes"New value: +"Commit index"
    • removedInput schema / properties / commit_index / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / commit_index / minimum
      Removed value: --9007199254740991
    • changedInput schema / properties / commit_index / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / component_name / description
      Previous value: -"Component name for by_component mode"New value: +"Component name; optional for render_counts, which it narrows to one component"
    • changedInput schema / properties / device_id / description
      Previous value: -"Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."New value: +"Device ID used to record or load the React profile."
    • changedInput schema / properties / mode / description
      Previous value: -"Query 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)"New value: +"Query mode; see Modes in the tool description."
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "by_component",
      -  "by_time_range",
      -  "by_index",
      -  "cascade_tree"
      -]New value: +[
      +  "by_component",
      +  "by_time_range",
      +  "by_index",
      +  "cascade_tree",
      +  "render_counts"
      +]
    • changedInput schema / properties / port / description
      Previous 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."New value: +"Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. Range: 1 to 65535."
    • changedInput schema / properties / time_range_ms / description
      Previous value: -"Time range filter for by_time_range mode"New value: +"Time range in ms since profiling started, the clock this tool prints"
    • changedInput schema / properties / time_range_ms / properties / end / description
      Previous value: -"End of range in ms since profiling started — the same clock profiler-commit-query prints"New value: +"End of range in ms"
    • changedInput schema / properties / time_range_ms / properties / start / description
      Previous value: -"Start of range in ms since profiling started — the same clock profiler-commit-query prints"New value: +"Start of range in ms"
    • changedInput schema / properties / top_n / description
      Previous 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."New value: +"Max results to return. Defaults to 20 for by_component / by_time_range, which count commits, and render_counts, which counts components. by_index counts individual fibers and returns all of them unless this is set; a small cap there can show less than the analyze report it is meant to expand on. Must be greater than 0."
    • removedInput schema / properties / top_n / maximum
      Removed value: -9007199254740991
  2. 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"
  3. 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."
  4. First observedv0.15.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds meaningful context beyond that: the lifecycle precondition that react-profiler-stop must have run, and the return shape (a markdown table or cascade tree). It does not mention data volume limits or truncation behavior for full by_index dumps, which would be useful given the 7-parameter surface.

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?

Front-loaded with the purpose, then a tight bulleted mode list where each line carries distinct information, followed by usage and failure conditions. The mode bullets are proportionally long but none is redundant; a short mapping of which parameters pair with which mode would improve density without adding bulk.

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?

For a 7-parameter, nested-object, mode-driven tool with no output schema, the description supplies what matters: mode semantics, the return format, and the prerequisite lifecycle state. Minor gaps remain around mode-to-parameter pairing and expected result size for the unbounded by_index dump, but nothing required to call it correctly is missing.

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 description coverage is 100%, so the baseline is 3, but the description earns an upgrade by defining the semantics of each mode enum value and what each returns, since the schema itself defers mode meaning to the description. It still leaves mode-specific parameter relevance implicit (e.g. that commit_index matters only for by_index/cascade_tree and time_range_ms only for by_time_range).

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 states a specific verb and resource ("Query React commit data") and then enumerates all five modes with what each one returns, so an agent can pick a mode without opening the schema. It is clearly distinguished from react-profiler-analyze (which the query follows) and react-profiler-stop (which must precede it).

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 gives explicit sequencing guidance: "Use when drilling into specific components or time windows after react-profiler-analyze," plus a hard precondition ("Fails if react-profiler-stop has not been called") and a note that render_counts surfaces sub-16ms commits invisible to the other modes. What is missing is explicit when-not-to-use guidance, e.g. when to prefer profiler-cpu-query or react-profiler-fiber-tree over these modes.

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