Skip to main content
Glama

get_cpu

Read-onlyIdempotent

Retrieve total and per-core CPU usage, clock, interrupt and context-switch rates, processor name and topology; optionally trace which threads and processes ran on each core for a set number of seconds.

Instructions

CPU: total and per logical processor (user, kernel, DPC, interrupt, clock), interrupt and context switch rates, the processor's name and topology. With trace_seconds > 0, also who ran on each core (threads and processes with their share), from a context switch trace.

Input Schema

NameRequiredDescriptionDefault
trace_secondsNoSeconds to trace before answering (0 to 30, default 0): turns on the trace that tells who uses the resource, which costs some CPU while it runs and stops by itself afterwards.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safe read-only, idempotent, non-destructive profile. The description adds useful behavioral context by explaining that trace_seconds > 0 also returns who ran on each core from a context switch trace, which goes beyond what the annotations declare.

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 two dense, front-loaded sentences with no wasted wording. It first enumerates the CPU metrics and then cleanly appends the optional trace behavior.

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?

For a one-parameter read-only tool with rich annotations, the description covers the key returned data and the optional tracing effect. It does not describe output shape or units, but that is a minor gap given the absence of an output schema and the otherwise clear metric listing.

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 parameter is already documented in structured data. The description still adds meaning by clarifying that trace_seconds > 0 yields per-core thread and process attribution with their share, which helps an agent understand the output impact of the parameter.

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 resource as CPU and lists the specific metrics returned: total and per logical processor, user, kernel, DPC, interrupt, clock, interrupt/context switch rates, name, and topology. It is easy to distinguish from siblings like get_memory or get_gpus by resource, though it does not explicitly contrast itself with alternatives such as get_system_overview.

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 metric list and the optional trace_seconds behavior, but the description does not state when to use get_cpu versus siblings like get_system_overview or get_process. No explicit exclusions or alternative-routing guidance is provided.

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