Skip to main content
Glama

analyze_perf_output

Parse perf report output to extract top CPU-consuming functions on Arm64, filtering by overhead and sample count.

Instructions

Parse the text output of perf report --stdio and return the top hot symbols.

Use this tool when a user pastes `perf report --stdio` output and wants to know
which functions are consuming the most CPU cycles on their Arm64 system.

Args:
    perf_report_text: Raw stdout of `perf report --stdio` or similar.
    top_n: Maximum number of hot symbols to return (default 10).
    min_overhead_pct: Filter out symbols below this overhead percentage (default 0.5).

Returns:
    {
      "summary": {"total_samples": int, "total_events": int | None, "command": str | None},
      "hot_symbols": [
        {"overhead_pct": 12.34, "samples": 1234, "command": "...",
         "module": "...", "symbol": "..."},
        ...
      ],
      "warnings": [...]
    }

Example: analyze_perf_output(perf_report_text=text, top_n=5, min_overhead_pct=1.0)
returns the 5 hottest symbols above 1% overhead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNo
min_overhead_pctNo
perf_report_textYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and goes beyond a one-line summary by specifying filtering semantics, default values, and the full return shape including warnings. It does not detail malformed-input failure modes, but this is a read-only parsing operation and the core behavior is transparent.

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?

The description is front-loaded with the core purpose, followed by usage, parameters, return shape, and a practical example. Every section earns its place, especially since there is no output schema and annotations are absent.

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?

For a parser with no annotated safety profile and no output schema, the description supplies the essential context: when to use it, what each parameter means, what the returned object looks like, and an example combining parameters. No critical information is missing for an agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides no per-parameter descriptions, so the description fully compensates by defining each argument: raw text input, top_n as the maximum number of symbols, and min_overhead_pct as a filter threshold with defaults. This gives an agent everything needed to set the parameters correctly.

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 resource: parse perf report --stdio text and return top hot symbols. This clearly conveys what the tool does and is distinguishable from sibling tools like ping, suggest_neon_intrinsic, and check_arm64_deps, which address unrelated tasks.

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?

The description explicitly says to use the tool when a user pastes perf report --stdio output and wants CPU-consuming functions. It does not mention when not to use it, but the sibling tools are in different domains, so no exclusions or alternatives are necessary.

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

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/jean-johnson-zwix/arm-code-mcp'

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