Skip to main content
Glama

react-profiler-analyze

Analyze stored React profiling data and return a markdown performance report identifying hot commits, root causes, and top components.

Instructions

Analyze stored profiling data and return a markdown performance report. Returns { report, reportFile, hotCommitsTotal, hotCommitsShown, sessionFiles }. The report is structured around hot React commits (≥16ms absolute floor) with per-commit render cascades, root cause identification, and a top components table. Raw profiling data is saved to disk with a unique session timestamp for later reload via profiler-load. After presenting the report, ask the user whether to investigate further (drill-down with profiler-cpu-query / profiler-commit-query) or implement fixes and re-profile for comparison. Requires react-profiler-stop to have been called first. Optional annotations param: provide Array<{offsetMs, label}> to annotate commits with the user action that preceded them. Compute offsetMs = tapTimestampMs - startedAtEpochMs where tapTimestampMs is the timestampMs returned by the tap/swipe tool and startedAtEpochMs is returned by react-profiler-start. Use when the profiling session is complete and you need to interpret the collected data. Fails if react-profiler-stop has not been called or no profiling data is stored.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoMetro server port
platformNoTarget platformios
device_idYesDevice logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId).
rn_versionNoReact Native version (e.g. "0.73.4")unknown
annotationsNoOptional list of user actions with their time offset from profiling start. Compute offsetMs = tapTimestampMs - startedAtEpochMs, where tapTimestampMs comes from the tap/swipe tool return value and startedAtEpochMs comes from react-profiler-start return value.
project_rootYesAbsolute path to the RN project root for session context detection
Behavior5/5

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

With no annotations, the description fully bears the burden of transparency. It details the output structure, that raw data is saved to disk for later reload via profiler-load, the report's focus on hot commits, and the prerequisite of react-profiler-stop. It also explains the annotations parameter's calculation. No contradictions exist.

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 and front-loaded: first sentence states purpose and output, followed by report structure, annotations explanation, prerequisites, and usage flow. At around 180 words, it is concise but could slightly reduce repetition (e.g., offsetMs explanation appears twice). Still, it efficiently conveys all necessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, no output schema, multiple sibling tools), the description is highly complete. It covers prerequisites, output shape, report structure, failure conditions, workflow after report, and relationship to other tools. The absence of an output schema is compensated by detailing the return fields. No gaps remain.

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 100%, so baseline is 3. The description adds value by thoroughly explaining the 'annotations' parameter, including how to compute offsetMs using other tool outputs (tap/swipe and react-profiler-start). For other parameters, it largely repeats schema descriptions but provides helpful context (e.g., linking device_id to debugger-connect). This additional guidance justifies a score above baseline.

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 clearly states the tool's purpose: 'Analyze stored profiling data and return a markdown performance report.' It specifies the output fields and report structure, and distinguishes itself from sibling tools by outlining the workflow and mentioning related profiler tools for drill-down, such as profiler-cpu-query and profiler-commit-query.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description provides explicit usage guidance: 'Use when the profiling session is complete and you need to interpret the collected data.' It states the prerequisite ('Requires react-profiler-stop to have been called first'), describes the post-report workflow (ask user about further investigation), and explains how to compute the optional annotations parameter. It also mentions failure conditions, offering complete usage context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/software-mansion/argent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server