Skip to main content
Glama

Profile renders

profile_renders

Counts React re-renders during a profiling window, listing which components rendered, how often, how long they took, and which update started each commit.

Instructions

Count React re-renders over a window: which components rendered, how many times, how long they spent, and which update started each commit. Installs a switchable hook on the React DevTools global hook (dev builds only) that prunes untouched subtrees, so it costs roughly what the commits cost rather than what the tree costs. Nothing re-renders on its own — drive the app during the window, which usually means background: true plus tap/swipe, then get_job to collect.

Input Schema

NameRequiredDescriptionDefault
topNoHow many components to list by render count (default 15).
labelNoName for the background job, shown by get_job.
backgroundNoStart profiling and return a job id immediately, so you can drive the app while it runs.
duration_msNoHow long to profile (default 5000, max 60000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/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 load and does well: it names the React DevTools global hook, restricts to dev builds, explains subtree pruning and its cost model, and warns that nothing re-renders on its own. It omits lifecycle details such as whether the hook stays installed after the window or must be removed, which matters for a tool that mutates global state.

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 front-loaded sentences: capability first, cost/constraint second, how-to-drive-it third. Dense with zero filler, and each sentence carries distinct information.

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, yet the description still tells the agent what comes back (per-component render counts, durations, initiating update) and points to get_job for collection. Only gap is post-window behavior of the installed hook.

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%, so all four parameters (top, label, background, duration_ms) are already documented in the schema with defaults and maxima. The description adds the background/get_job workflow context but no new semantics for top, label, or duration beyond what the schema states. Baseline 3 applies.

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?

Opens with a specific verb and resource ('Count React re-renders over a window') and enumerates the exact outputs: components rendered, counts, time spent, and the update that started each commit. That is specific enough to separate it from siblings like profile_js or get_fps without reading schemas.

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 concrete operating instructions: drive the app during the window, use background: true plus tap/swipe, then get_job to collect. It never explicitly says when to prefer this over profile_js or sample_cpu, so it stops short of full alternative routing.

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