Skip to main content
Glama

get_savings_plans_utilization

Retrieve AWS Savings Plans utilization percentages for specified date ranges to monitor cost optimization effectiveness.

Instructions

Retrieves Savings Plans utilization percentages.

Input Schema

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

Implementation Reference

  • Handler function that calls AWS Cost Explorer's GetSavingsPlansUtilizationCommand with the provided time period, processes the response to extract utilization metrics (percentage, commitments), and returns formatted JSON.
    if (name === "get_savings_plans_utilization") {
        const command = new GetSavingsPlansUtilizationCommand({
            TimePeriod: { Start: (args as any).start_date, End: (args as any).end_date }
        });
        const response = await costExplorerClient.send(command);
    
        const utils = response.SavingsPlansUtilizationsByTime?.map(u => ({
            Date: u.TimePeriod?.Start,
            UtilizationPercentage: u.Utilization?.UtilizationPercentage + "%",
            TotalCommitment: u.Utilization?.TotalCommitment,
            UsedCommitment: u.Utilization?.UsedCommitment,
            UnusedCommitment: u.Utilization?.UnusedCommitment
        })) || [];
    
        return { content: [{ type: "text", text: JSON.stringify(utils, null, 2) }] };
    }
  • src/index.ts:257-268 (registration)
    Tool registration entry in the ListTools response, including name, description, and input schema definition (Zod-like object requiring start_date and end_date).
    {
        name: "get_savings_plans_utilization",
        description: "Retrieves Savings Plans 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 for the tool, defining required string parameters for start_date and end_date 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 of GetSavingsPlansUtilizationCommand from AWS SDK Cost Explorer client.
    import { CostExplorerClient, GetCostAndUsageCommand, GetCostForecastCommand, GetAnomaliesCommand, GetSavingsPlansUtilizationCommand, GetReservationUtilizationCommand } from "@aws-sdk/client-cost-explorer";
  • Initialization of the CostExplorerClient used by the handler.
    const costExplorerClient = new CostExplorerClient({});
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'retrieves' data, implying a read-only operation, but doesn't specify permissions required, rate limits, response format, or whether it returns aggregated or detailed percentages. This is inadequate for a tool with no annotation coverage.

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 with zero wasted words. It's front-loaded with the core purpose, making it easy to parse quickly, which is ideal for conciseness in a tool definition.

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 the lack of annotations and output schema, the description is incomplete. It doesn't explain what the utilization percentages represent (e.g., overall, by plan, time granularity), how results are structured, or any behavioral constraints. For a financial data tool with no structured support, this leaves significant gaps for an agent.

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 parameters as date strings in YYYY-MM-DD format. The description adds no parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without adding value.

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 tool's purpose with a specific verb ('Retrieves') and resource ('Savings Plans utilization percentages'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'get_reservation_utilization' or 'get_cost_breakdown' that might retrieve related financial data, which prevents 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. With many sibling tools for cost and utilization data (e.g., 'get_reservation_utilization', 'get_cost_breakdown'), there's no indication of context, prerequisites, or exclusions, leaving the agent to guess based on the tool 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