Skip to main content
Glama

Export frames to Perfetto

perf_export_trace
Idempotent

Exports a recording's GPU frames as a .chrome-trace file for viewing in ui.perfetto.dev or chrome://tracing, one slice per frame, and returns the file name and frame count.

Instructions

Writes a recording's GPU frames as <run>.chrome-trace in the runs directory, for ui.perfetto.dev and chrome://tracing: one slice per GPU frame. Returns the file name and the number of frames.

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": {
      "run": "<run>"
    },
    "name": "perf_export_trace"
  }
}

Input Schema

NameRequiredDescriptionDefault
runYesa run name from perf_runs
fieldsNoresult paths to keep, dotted: common.frame_pacing

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.28.0
    • addedInput schema / properties / fields
      Added value: +{
      +  "description": "result paths to keep, dotted: common.frame_pacing",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Addedv0.10.1

TDQS

A4/5.0
Behavior4/5

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

Annotations mark this as a non-read-only write, and the description explains exactly what the side effect is: a `.chrome-trace` file materialized in the runs directory with a deterministic name derived from the run. That clarifies both the mutation and the effective idempotency. It stops short of stating whether an existing trace file is overwritten or how long a large export may take.

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?

A single front-loaded sentence with the verb and output artifact first, then the compatibility targets, then the return values. No padding or redundant restatement of the title.

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?

An output schema exists, so the explicit return statement is a bonus rather than a necessity, and both parameters are schema-documented. The only meaningful gap for a file-export tool is overwrite behavior and expected cost/size for large recordings.

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 the parameters are already documented; the description only reinforces `run` through the `<run>.chrome-trace` naming convention. The `fields` filter (dotted result paths) is not mentioned at all in the description, so no meaning is added beyond the schema.

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?

States a specific verb and artifact: writes a recording's GPU frames as `<run>.chrome-trace` in the runs directory, with one slice per frame. The concrete output format and consumer targets (ui.perfetto.dev, chrome://tracing) make it unmistakable versus read-only siblings like trace_query or trace_tables.

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?

Usage is implied by the artifact description — you call this when you need a Perfetto-viewable trace file — but there is no explicit when-to-use/when-not statement and no alternative is named. An agent must infer the routing decision from the output format alone.

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