Skip to main content
Glama

profiler-load

Restore saved React or native profiling sessions from disk into memory for query tools, or list available sessions. Use to revisit past profiling data without a new recording.

Instructions

Fetch and restore a previously captured profiling session from disk into memory so query tools can operate on it. This is the disk-restore counterpart to react-profiler-stop/native-profiler-stop, which write data, and to the query tools (profiler-cpu-query, profiler-commit-query, profiler-stack-query), which read it. Use when you need to revisit past session data without capturing a new recording. Modes:

  • list: Show all available profiling sessions in the project's debug directory.

  • load_react: Load a React profiler session (CPU profile + commit tree) into memory. Requires session_id.

  • load_native: Re-parse native profiler XML files into memory. Requires session_id and device_id. For Android .pftrace restores, pass app_process for older sessions that do not have a metadata sidecar. Returns a summary of the loaded session or a session list for the list mode. Fails if the session_id is not found or required XML files are missing from disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYeslist: show available sessions on disk. load_react: load a React profiler session into memory for query tools. load_native: re-parse native profiler XML files (xctrace on iOS) into memory for query tools.
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.
device_idYesTarget device id from `list-devices`. Used to cache the loaded React session under the correct port+device key, and required to resolve the native profiler session for load_native.
session_idNoTimestamp-based session identifier (e.g. '20250313-143022') from the list output. Required for load_react and load_native modes.
app_processNoAndroid package name to use when restoring older load_native .pftrace sessions that do not have a metadata sidecar.

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 port — the loaded React data is cached under this port for query tools (default 8081)"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. Changed1 schema field changedv0.22.0
    • addedInput schema / properties / device_id / minLength
      Added value: +1
  3. First observedv0.15.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it states the operation is a disk-to-memory restore, describes the side effect of making data available to query tools, and discloses failure conditions ('Fails if the session_id is not found or required XML files are missing'). It does not discuss memory footprint or concurrent-session behavior, but the core behavioral profile is clear.

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 purpose sentence, sibling-context sentence, usage sentence, mode list, and return/failure statement. It is slightly long but each section serves a distinct purpose, and key information such as mode requirements is clearly isolated.

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 five parameters, no output schema, and no annotations, the description still covers all invocation-critical details: mode semantics, required parameters, optional app_process behavior, return shape at a high level, and failure modes. An agent has enough to select and call this tool correctly.

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% and each parameter already has a description. The tool description adds extra value on top by explaining the mode-specific roles of session_id, device_id, and app_process, including the Android .pftrace edge case. This goes beyond simply restating schema text.

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: 'Fetch and restore a previously captured profiling session from disk into memory so query tools can operate on it.' It explicitly distinguishes itself from sibling tools by naming the write counterparts and the query tools, leaving no ambiguity about its role.

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 tells the agent exactly when to use this tool: 'Use when you need to revisit past session data without capturing a new recording.' It also routes to alternatives by naming the stop tools for data creation and the query tools for reading, and it specifies mode-specific requirements like session_id and device_id.

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