Skip to main content
Glama

get_reservation_utilization

Retrieve Reserved Instance utilization percentages for AWS resources to analyze cost efficiency and optimize cloud spending.

Instructions

Retrieves Reserved Instance (RI) utilization percentages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateYesStart date (YYYY-MM-DD).
end_dateYesEnd date (YYYY-MM-DD).

Implementation Reference

  • The main handler function for the 'get_reservation_utilization' tool. It uses AWS Cost Explorer's GetReservationUtilizationCommand to fetch Reserved Instance (RI) utilization data for a given time period and formats the response into a time-series of utilization percentages and hours.
    if (name === "get_reservation_utilization") {
        const command = new GetReservationUtilizationCommand({
            TimePeriod: { Start: (args as any).start_date, End: (args as any).end_date }
        });
        const response = await costExplorerClient.send(command);
    
        const utils = response.UtilizationsByTime?.map(u => ({
            Date: u.TimePeriod?.Start,
            TotalPotentialRIHours: u.Total?.TotalPotentialRISavings, // Approximate proxy if direct hours not shown in all interfaces
            UtilizationPercentage: u.Total?.UtilizationPercentage + "%",
            PurchasedUnits: u.Total?.PurchasedHours,
            TotalActualHours: u.Total?.TotalActualHours,
            UnusedHours: u.Total?.UnusedHours
        })) || [];
    
        return { content: [{ type: "text", text: JSON.stringify(utils, null, 2) }] };
    }
  • src/index.ts:269-280 (registration)
    Registration of the tool in the ListTools response, defining its name, description, and input schema requirements.
    {
        name: "get_reservation_utilization",
        description: "Retrieves Reserved Instance (RI) utilization percentages.",
        inputSchema: {
            type: "object",
            properties: {
                start_date: { type: "string", description: "Start date (YYYY-MM-DD)." },
                end_date: { type: "string", description: "End date (YYYY-MM-DD)." }
            },
            required: ["start_date", "end_date"]
        }
    },
  • Input schema definition for the tool, specifying required start_date and end_date parameters in YYYY-MM-DD format.
    inputSchema: {
        type: "object",
        properties: {
            start_date: { type: "string", description: "Start date (YYYY-MM-DD)." },
            end_date: { type: "string", description: "End date (YYYY-MM-DD)." }
        },
        required: ["start_date", "end_date"]
    }
  • Import statement for the GetReservationUtilizationCommand and CostExplorerClient used by the tool.
    import { CostExplorerClient, GetCostAndUsageCommand, GetCostForecastCommand, GetAnomaliesCommand, GetSavingsPlansUtilizationCommand, GetReservationUtilizationCommand } from "@aws-sdk/client-cost-explorer";
  • Initialization of the AWS CostExplorerClient instance used to send the GetReservationUtilizationCommand.
    const costExplorerClient = new CostExplorerClient({});
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'retrieves' data (implying read-only), but doesn't specify authentication requirements, rate limits, data freshness, or what format the utilization percentages are returned in. For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

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 a single, efficient sentence that immediately conveys the core purpose without any wasted words. It's appropriately sized for a simple retrieval tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a tool that presumably returns complex utilization data. It doesn't explain what the output looks like (e.g., time-series data, aggregated percentages), nor does it provide context about RI types or scopes. For a data retrieval tool with rich sibling tools, this leaves too much unspecified.

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?

The input schema has 100% description coverage, clearly documenting both required date parameters with format specifications. The description doesn't add any parameter semantics beyond what the schema already provides (no explanation of date range constraints or how utilization is calculated across that range). The baseline score of 3 is appropriate when the schema does all the work.

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 states the verb ('Retrieves') and resource ('Reserved Instance (RI) utilization percentages'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from sibling tools like 'get_savings_plans_utilization' or other cost-related tools, which would be needed for a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, context for when RI utilization data is needed, or comparison to other cost/usage tools in the sibling list. The agent must infer usage from the name alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bhaveshopss/MCP-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server