Skip to main content
Glama

resource_pressure_analysis

Read-only

Rank running containers by CPU and memory pressure versus limits, identify near/over threshold cases, and recommend limit raises, missing memory limit fixes, or scale-out actions.

Instructions

[READ] Rank containers by CPU/memory pressure vs their limits + recommend.

Pulls a one-shot CPU%/mem% sample for each running container (or uses injected 'samples'), flags each 'near' (>= 80% of a threshold) or 'over' (>= threshold), and attaches a recommendation (raise a limit, set a missing memory limit, scale out). Ranks worst-first by the higher of CPU%/mem%. Every row carries its numbers.

Args: cpu_threshold: CPU% at/above which a container is over pressure (default 80). mem_threshold: Memory% at/above which a container is over pressure (default 80). samples: Injected rows {id, name, cpuPercent, memPercent, memUsageBytes, memLimitBytes}; skips live collection. target: Target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
targetNo
samplesNo
cpu_thresholdNo
mem_thresholdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.2/5.0
Behavior4/5

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

readOnlyHint=true already covers the safety profile, so the bar is lower, and the description adds substantial behavior: one-shot vs live collection, the near/over classification logic, worst-first ranking, attached recommendations, and that every row carries its numbers. It stops short of describing pagination or edge cases, but the disclosure is well beyond the annotation.

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?

The one-line summary is front-loaded with the key scope before the mechanics, and content is dense with little filler. The Args block is somewhat mechanical but each entry adds real semantic value, so it earns its length.

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?

With no output schema, the description carries return-value burden and does so reasonably, describing classifications, recommendations, ranking, and per-row numbers. For a read-only analytical tool with all params documented it is close to complete, though it omits any note on empty results or the exact response structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the full load, and it does: it documents all four params, explains cpu_threshold/mem_threshold defaults and semantics, describes the injected 'samples' row shape (id, name, cpuPercent, memPercent, memUsageBytes, memLimitBytes) and that it skips live collection, and clarifies 'target' is a config name with a default.

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?

Opens with a specific verb+resource ('Rank containers by CPU/memory pressure vs their limits') plus the differentiator '+ recommend', which separates it from sibling read tools like container_stats or container_top that return raw samples without ranking or remediation. An agent can grasp the analytical nature of the tool without opening the schema.

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 implies usage (analyze which containers are under pressure, with injected samples for offline analysis) and the '[READ]' tag conveys safety, but it never states when to choose this over container_stats/container_top or any exclusion conditions. Usage is inferable but not explicitly guided.

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