Skip to main content
Glama
cortezcristian

Kubecost MCP Server

list_budgets

Retrieve all configured budget rules to monitor and control Kubernetes spending across your cloud infrastructure.

Instructions

List all budget rules in Kubecost

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:36-53 (registration)
    Registration of the 'list_budgets' MCP tool using McpServer.tool(), including inline description, input schema (empty object indicating no parameters), and complete handler function that calls the Kubecost client and returns the result as JSON text.
      'list_budgets',
      'List all budget rules in Kubecost',
      {},
      async () => {
        try {
          const result = await this.kubecostClient.listBudgets();
          return {
            isError: false,
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
          };
        } catch (error) {
          return {
            isError: true,
            content: [{ type: 'text', text: error instanceof Error ? error.message : String(error) }]
          };
        }
      }
    );
  • Core helper function in KubecostClient that performs the actual API call to list budgets by GET /model/budget endpoint.
    async listBudgets(): Promise<BudgetListResponse> {
      const response = await this.client.get('/model/budget');
      return response.data;
    }
  • TypeScript interface defining the expected response structure for the listBudgets API call, used for type safety in the handler.
    export interface BudgetListResponse {
      budgets: BudgetResponse[];
    }
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 the tool lists budget rules but doesn't mention whether this requires authentication, how results are returned (e.g., pagination, format), rate limits, or error conditions. This leaves significant gaps in understanding how the tool behaves in practice.

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 directly states the tool's function without unnecessary words. It's front-loaded with the core purpose ('List all budget rules'), making it easy to parse quickly.

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?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'budget rules' are in Kubecost context, what format the list returns, or any behavioral aspects like authentication needs. Given the complexity implied by sibling tools (create/update/delete budgets), more context would be helpful.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, focusing instead on the tool's purpose. This meets the baseline expectation for tools without parameters.

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 action ('List') and resource ('all budget rules in Kubecost'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get_budget' (which might retrieve a single budget), but the verb 'List all' implies a comprehensive retrieval operation.

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 like 'get_budget' (for a single budget) or 'get_cost_allocation' (for cost data). It simply states what the tool does without context about appropriate use cases or prerequisites.

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/cortezcristian/kubecost-mcp'

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