Skip to main content
Glama
xTey-wu

openEuler MCP Toolkit

by xTey-wu

monitor_context_switches

Read-only

Sample read-only context-switch counters for a Linux system or specific PID over a set duration and interval to observe scheduling activity without modifying processes.

Instructions

READ-ONLY CONTEXT-SWITCH sampling for the system or one PID.

This observes counters only and cannot stop or modify processes. It is not a CPU scheduling simulation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNoPID for per-process sampling; null means system-wide
duration_secondsNoTotal sampling duration in seconds
interval_secondsNoSeconds between context-switch samples

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNo
scopeYes
samplesYes
summaryYes
duration_secondsYes
interval_secondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is structured data. The description reinforces this ('observes counters only and cannot stop or modify processes') and adds the useful framing that it is pure observation, not simulation, but discloses nothing beyond that: no sampling overhead, blocking behavior, or resource cost of running the monitor.

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?

Front-loaded with the operation and scope in the first clause, with the two disambiguating statements following. Slightly redundant in that 'READ-ONLY' and 'cannot stop or modify processes' say the same thing twice, but there is no filler beyond that.

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 return values need not be explained, and all three parameters are covered by the schema. Safety is covered by annotations and reinforced in text. For a zero-required-param observational tool this is sufficient, though a note on sampling duration cost would make it airtight.

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 description coverage is 100%, so pid, duration_seconds, and interval_seconds are already fully documented with defaults and bounds in the schema. The description adds no parameter-level meaning (e.g., cost trade-offs of short intervals), so the baseline of 3 applies.

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 ('CONTEXT-SWITCH sampling') and pins the scope ('the system or one PID'), so the agent knows exactly what is measured and at what granularity. The closing clause explicitly separates it from the sibling simulate_cpu_scheduling, which is the nearest lookalike in the toolset.

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?

Gives a clear when-not signal by naming simulation as the wrong mental model ('It is not a CPU scheduling simulation'), which correctly routes the agent away from simulate_cpu_scheduling. It stops short of telling the agent when to prefer this over sample_cpu_time_ratios or other observation tools, so no full alternative routing.

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