Skip to main content
Glama
MCP-OpenStack-Ops

MCP-OpenStack-Ops

by call518

Get Usage Statistics

get_usage_statistics

Retrieve current-project Nova allocation-hours and period usage statistics—servers, RAM MB-hours, CPU hours, disk GB-hours—to generate project usage reports without mixing live snapshots.

Instructions

Get current-project Nova allocation-hours and separate current snapshots.

Functions:

  • Show project usage statistics over a specified time period

  • Display servers, RAM MB-Hours, CPU Hours, and Disk GB-Hours

  • Provide detailed server usage breakdown when available

  • Keep current compute/network/storage snapshots separate from period data

Use for project usage reports. Period data comes from Nova simple tenant usage. It measures allocation-hours, not live utilization or monetary charges. For measured CPU/memory utilization or trends, use get_gnocchi_measures. Missing or denied usage API returns failure without synthetic fallback.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_usage_statistics"
  }
}

Input Schema

NameRequiredDescriptionDefault
end_dateNoExclusive end date at UTC midnight (YYYY-MM-DD; defaults to today)
start_dateNoInclusive start date at UTC midnight (YYYY-MM-DD; defaults to 30 days ago)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.6.0
    • changedInput schema / properties / end_date / description
      Previous value: -"End date in YYYY-MM-DD format (optional, defaults to today)"New value: +"Exclusive end date at UTC midnight (YYYY-MM-DD; defaults to today)"
    • changedInput schema / properties / start_date / description
      Previous value: -"Start date in YYYY-MM-DD format (optional, defaults to 30 days ago)"New value: +"Inclusive start date at UTC midnight (YYYY-MM-DD; defaults to 30 days ago)"
  2. Changed2 schema fields changedv3.5.8
    • addedInput schema / properties / end_date / description
      Added value: +"End date in YYYY-MM-DD format (optional, defaults to today)"
    • addedInput schema / properties / start_date / description
      Added value: +"Start date in YYYY-MM-DD format (optional, defaults to 30 days ago)"
  3. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the upstream data source (Nova simple tenant usage), the semantics of the numbers (allocation-hours, not utilization or billing), and error behavior ("Missing or denied usage API returns failure without synthetic fallback"). It omits anything about permissions or the shape of the dual result set, which the output schema covers.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The lead sentence is front-loaded and effective, but the Functions bullets restate it ("Show project usage statistics over a specified time period") and the fourth bullet duplicates "separate current snapshots" from the opening line. The list adds enumeration value but carries noticeable redundancy.

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 tool that merges two data views (period usage plus current snapshots), the description explains the split and where the numbers come from, and an output schema means return values need no prose. Only minor gaps remain around access requirements and the failure mode's exact shape.

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 coverage is 100% and both parameters document their inclusive/exclusive UTC-midnight semantics and defaults. The description only adds the vague phrase "over a specified time period", so it neither compensates for nor detracts from the schema baseline.

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 opening sentence names a specific verb (get) and resource (Nova allocation-hours plus current snapshots) and scopes it to the current project. The Functions list enumerates exact metrics returned (servers, RAM MB-Hours, CPU Hours, Disk GB-Hours), so an agent can distinguish it from get_gnocchi_measures without opening a schema.

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?

It gives an explicit use case ("Use for project usage reports") and an explicit exclusion with a named alternative ("For measured CPU/memory utilization or trends, use get_gnocchi_measures"). It further fences the scope by stating it measures allocation-hours, not live utilization or monetary charges.

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