Skip to main content
Glama

get_top_consumers

Read-onlyIdempotent

Find top resource consumers by CPU, memory, or disk usage to target capacity planning and performance analysis.

Instructions

[READ] Query resources with highest consumption of a given metric. Then call get_resource_metrics on a returned id for its history.

Returns a paginated envelope: items, returned, limit, total (null when the API reports no size), truncated, hint. Check truncated before calling this the complete set. Resources with no data for the key are left out, not ranked at zero; excluded_no_data counts the ones the ranking API listed with no points, and hint says how many were left out when that shortened the list. Each item's value is the average over the last hour (the number Aria ranks by) and latest_value the most recent point; items are descending by value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNoNumber of top consumers to return (max 50). Default 10.
targetNoAria target name from config; default when omitted.
metric_keyNoMetric to rank by, e.g. cpu|usage_average, mem|usage_average, disk|usage_average.cpu|usage_average
resource_kindNoResource kind to scope the query. Default VirtualMachine.VirtualMachine

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.10.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / metric_key / description
      Added value: +"Metric to rank by, e.g. cpu|usage_average, mem|usage_average, disk|usage_average."
    • addedInput schema / properties / resource_kind / description
      Added value: +"Resource kind to scope the query. Default VirtualMachine."
    • addedInput schema / properties / target / description
      Added value: +"Aria target name from config; default when omitted."
    • addedInput schema / properties / top_n / description
      Added value: +"Number of top consumers to return (max 50). Default 10."
  2. Changed1 schema field changedv1.8.9
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "items": {
      -        "additionalProperties": true,
      -        "type": "object"
      -      },
      -      "title": "Result",
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "get_top_consumersOutput",
      -  "type": "object"
      -}New value: +null
  3. Addedv1.5.29
  4. Removedv1.5.28
  5. First observedv1.3.2

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already indicate readOnlyHit, idempotentHint, and destructiveHint, but the description goes far beyond them. It details the paginated envelope, explicitly tells the agent to check 'truncated' before treating the collection as complete, explains excluded_no_data and hint for no-data resources, describes the meaning of value as the last-hour average, and clarifies latest_value and descending order.

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 description is dense but well-structured: purpose and chaining first, then a detailed result semantics paragraph. Every sentence earns its place; it is slightly long due to the no-data/envelope explanation, but this is necessary since no output schema exists.

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 takes on the burden of explaining the response envelope, pagination, truncation, and no-data semantics—which it does. It also covers the natural follow-up call to get_resource_metrics. The only gap is the absence of explicit alternative/comparison context, but the tool is fully callable.

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?

Input schema coverage is 100% with descriptions and examples for all parameters (top_n, target, metric_key, resource_kind). The description adds no additional parameter-level semantics, so the baseline schema coverage score 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?

The description opens with '[READ] Query resources with highest consumption of a given metric' and explicitly tells the agent to call get_resource_metrics on a returned id for its history. This gives a specific verb, resource, and metric scope while distinguishing it from siblings like list_resources and get_resource_metrics.

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 clearly states that you use this to query top consumers and then chain to get_resource_metrics, so usage is implied. However, it does not provide explicit when-to-use/when-not-to-use guidance or compare alternatives, such as 'use list_resources instead of get top consumers'.

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