Skip to main content
Glama
walac

perf-mcp

by walac

perf_kwork_timehist

Analyze kernel work item timing with timestamped events, showing each handler's duration to identify latency hotspots in interrupts, softirqs, and workqueues from perf.data.

Instructions

Timestamped kernel work item events showing when each handler ran and for how long.

Key parameters:

  • call_graph: 'fp' or 'dwarf' for callchain.

  • name: filter to specific handler.

Output: per-event timeline. Requires: perf kwork record.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cpuNoCPUs to filter
nameNoFilter by work name
sortNoSort by key(s): count,runtime,max,avg
timeNoTime span to analyze
forceNoDon't complain, do it
inputYesPath to perf.data file
kworkNoWork type to trace (irq, softirq, workqueue)
symfsNoSymbol filesystem root
use_bpfNoUse BPF for tracing
verboseNoVerbosity level (0-2)
vmlinuxNovmlinux pathname
kallsymsNokallsyms pathname
max_stackNoMaximum stack depth
call_graphNoCall graph options
with_summaryNoShow summary along with detailed output
dump_raw_traceNoDump raw trace in ASCII

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool consumes a perf kwork record (rather than doing recording itself) and that it outputs a per-event timeline. However, it does not reveal whether the operation is read-only, whether it writes files, requires special privileges, or how the BPF option behaves. This is moderate transparency—better than nothing but incomplete for a tool with 16 parameters.

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 exceptionally concise: a one-sentence purpose, a two-bullet key-parameter list, and one-line output and requirement. Every sentence contributes unique information. It is front-loaded with the core purpose and structured with clear labels, making it easy to scan. No wasted words or repetition of schema fields.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (16 params), no annotations, and an output schema (which the description partially covers with 'per-event timeline'), the description gives the essential context: what it does, its input prerequisite, and its output. However, it lacks differentiation from sibling commands (e.g., kwork_latency, kwork_report) and does not explain the overall perf kwork workflow. It is adequate but leaves the agent to infer the tool's position relative to others.

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 baseline is 3. The description adds meaningful detail for two parameters: call_graph ('fp' or 'dwarf' for callchain) and name (filter to handler). These go slightly beyond the schema descriptions, but the many other parameters (sort, time, force, etc.) receive no extra explanation. The addition is marginal, keeping the score at baseline.

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 clearly specifies the tool's purpose: 'Timestamped kernel work item events showing when each handler ran and for how long.' This is a specific verb-resource pair (showing events) and is distinct from the 'top', 'latency', and 'report' sibling tools by focusing on per-event timelines. It stops short of a 5 because it doesn't explicitly differentiate from siblings, but the 'per-event timeline' wording strongly implies the unique angle.

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?

The description provides a key prerequisite ('Requires: perf kwork record') and lists two key parameters, but does not offer explicit guidance on when to prefer this tool over alternatives. The intended use case (analyzing timing of handlers) is implied but not stated directly, and no alternatives are mentioned. This is sufficient context to guess usage, but not clear, exclusionary guidance.

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

Install Server

Other Tools

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/walac/perf-mcp'

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