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[]; }

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