Skip to main content
Glama

Profile JS

profile_js

Records a Hermes CPU profile for a set duration and reports JS thread busy/idle/GC time, top self and inclusive functions, saving the raw .cpuprofile for Chrome DevTools analysis.

Instructions

Record a Hermes CPU profile for duration_ms, then report where the JS thread spent its time: busy/idle/GC split, the functions with the most self time, and the ones with the most inclusive time (symbolicated through Metro when it can). The raw .cpuprofile is saved to disk and opens in Chrome DevTools → Performance → Load. Drive the app (or leave it alone) while this runs — the profile covers whatever happens during the window.

Input Schema

NameRequiredDescriptionDefault
topNoRows per table (default 20).
saveNoWrite the raw .cpuprofile to disk (default true). Set false to get the summary only.
duration_msNoHow long to sample for (default 5000, max 120000).
sampling_interval_usNoSampling interval in microseconds. Hermes may ignore it and keep its own default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden and does a solid job: it discloses that a raw .cpuprofile is written to disk, that it can be loaded in Chrome DevTools, that symbolication is best-effort ('through Metro when it can'), and that sampling is bounded by a window. It stops short of saying whether the call blocks the app, what its overhead is, or what happens when symbolication or the device connection fails.

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 tight sentences: capability and output first, artifact/DevTools second, capture-window advice last. No sentence is filler — even the parenthetical 'or leave it alone' resolves a real operator question.

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?

With no output schema and no annotations, the description steps up by enumerating the report contents and the on-disk artifact. It leaves a modest gap around blocking behavior, failure modes (no Metro, device disconnect), and what the summary looks like when save=false.

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 description coverage is 100% and each parameter already documents its default, bounds, and even Hermes' tendency to ignore sampling_interval_us, so the description can safely defer. It adds only the implicit link between duration_ms and 'the window' and no syntax or behavior beyond the schema.

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?

The description gives a specific verb and resource ('Record a Hermes CPU profile') and even previews the output (busy/idle/GC split, top self-time and inclusive-time tables). It never names the closely related siblings sample_cpu or profile_renders, so the agent has to infer the distinction from the 'JS thread' phrasing rather than being told outright.

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

Usage Guidelines3/5

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

'Drive the app (or leave it alone) while this runs — the profile covers whatever happens during the window' is genuinely useful operating guidance for the capture window. But there is no explicit when-to-use/when-not or routing to alternatives such as sample_cpu (process-level CPU) or profile_renders (render profiling), which is the main ambiguity an agent would face.

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