Skip to main content
Glama
walac

perf-mcp

by walac

perf_sched_latency

Identify tasks suffering scheduling starvation by analyzing per-task max, average, and total latency from perf.data.

Instructions

Per-task scheduling latency statistics. Shows max, average, and total scheduling delay per task.

Use this to identify tasks that are being starved or experiencing long scheduling delays.

Key parameters:

  • sort: sort key -- 'max' (default), 'switch', 'runtime', 'avg'.

  • pid: filter to specific PIDs.

Output: table with task name, max latency, avg latency, switch count. Requires: perf sched record.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cpuNoCPUs to filter
pidNoAnalyze only these PIDs
tidNoOnly these TIDs
prioNoFilter by task priority
sortNoSort by key(s): max,switch,runtime,avg
forceNoDon't complain, do it
inputYesPath to perf.data file
symfsNoSymbol filesystem root
outputNoOutput file path
repeatNoNumber of times to repeat
verboseNoVerbosity level (0-2)
vmlinuxNovmlinux pathname
kallsymsNokallsyms pathname
dump_raw_traceNoDump raw trace in ASCII

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses the output table fields, the sort default, and the prerequisite command. It implies a read-only analytical behavior, though it does not explicitly state non-mutating or permission requirements.

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 compact and well-structured: an intro sentence, a use-case sentence, bulleted key parameters, an output line, and a prerequisite line. Every sentence adds value and is front-loaded with purpose.

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?

Given the output schema and full parameter schema coverage, the description covers the essential context: what it does, when to use it, key parameters, output shape, and prerequisite. It could be more complete by distinguishing from perf_sched_timehist, but overall it is sufficient for a 14-parameter tool.

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%, so the baseline is 3. The description adds value by specifying the default for 'sort' ('max') and highlighting 'pid' as a filter. These details go beyond the schema descriptions without repeating all parameters.

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 identifies the tool as reporting per-task scheduling latency statistics, showing max, average, and total delay. This is a specific verb+resource, but it does not explicitly distinguish itself from the closely related sibling perf_sched_timehist.

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?

It explicitly states when to use the tool: 'Use this to identify tasks that are being starved or experiencing long scheduling delays.' It also mentions the prerequisite 'Requires: perf sched record.' However, it does not provide exclusions or mention alternative siblings.

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