Skip to main content
Glama

Query PCP historical metrics

pcp_query_metrics
Read-only

Fetch historical PCP metric samples as JSON from local or remote Linux hosts, with configurable time ranges and intervals for performance diagnostics.

Instructions

Retrieves historical metric data from PCP archives as JSON samples. When start_time, end_time, or interval is omitted, reasonable defaults are chosen, targeting one hour or about 20 samples. Call pcp_guide first for the metric catalog and how to read the values; do not guess metric names. Use only if get_system_information() indicates PCP is available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesSystem to run on: 'localhost' for the system the MCP server runs on, or a remote host to connect to via SSH
metricsYesList of PCP metric names to query
end_timeNoEnd time as a full date and time (e.g., '2026-08-14 16:00:00'), or 'now'. Timestamps without a UTC offset are read in the target system's timezone.
intervalNoSampling interval (e.g., '1minute', '10seconds', '5minutes').
start_timeNoStart time as a full date and time (e.g., '2026-08-14 14:00:00'), or 'now'. Timestamps without a UTC offset are read in the target system's timezone.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.7.0

TDQS

A4.3/5.0
Behavior4/5

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

With readOnlyHint=true already covering safety, the description still adds meaningful behavior: omitted start_time/end_time/interval produce defaults targeting one hour or ~20 samples, results come back as JSON samples, and an availability precondition gates the call. It stops short of covering remote-SSH auth requirements or failure behavior.

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?

Three tight sentences with zero filler; the core retrieval statement is front-loaded, followed by defaulting behavior and then the prerequisite/gating conditions. Every clause earns its place.

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-format detail is unnecessary, and the description covers prerequisites, defaulting, and availability gating appropriately. Only minor gaps remain around remote-host connection/auth behavior, which matters given the 'localhost vs SSH' host parameter.

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, but the description adds real semantics beyond the schema: it explains the coordinated defaulting behavior across start_time, end_time, and interval, which the schema's 'default: null' entries do not convey.

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?

States a specific verb and resource ('Retrieves historical metric data from PCP archives as JSON samples'), and the word 'historical' distinguishes it from live/catalog siblings like pcp_list_metrics and pcp_performance_summary. It never names those siblings explicitly, so the disambiguation is inferential rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly prescribes the prerequisite chain: call pcp_guide first for the catalog and value semantics, never guess metric names, and only use this if get_system_information() reports PCP is available. That is when-to-use, when-not-to-use, and the alternative source, all named.

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