delete_budget
Remove a budget rule from Kubecost cost management platform to eliminate unwanted spending constraints and maintain accurate cost control policies.
Instructions
Delete a budget rule from Kubecost
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budgetId | Yes |
Implementation Reference
- src/index.ts:153-171 (registration)MCP tool registration for 'delete_budget', including input schema { budgetId: z.string() } and inline handler that calls kubecostClient.deleteBudget(budgetId) and returns formatted responsethis.tool( 'delete_budget', 'Delete a budget rule from Kubecost', { budgetId: z.string() }, async ({ budgetId }) => { try { await this.kubecostClient.deleteBudget(budgetId); return { isError: false, content: [{ type: 'text', text: `Budget with ID ${budgetId} deleted successfully` }] }; } catch (error) { return { isError: true, content: [{ type: 'text', text: error instanceof Error ? error.message : String(error) }] }; } } );
- src/index.ts:156-156 (schema)Input schema for delete_budget tool using Zod validation{ budgetId: z.string() },
- src/client/kubecost-client.ts:58-60 (helper)KubecostClient helper method that performs the HTTP DELETE request to delete the budget via Kubecost APIasync deleteBudget(budgetId: string): Promise<void> { await this.client.delete(`/model/budget/${budgetId}`); }