Skip to main content
Glama

get_budget

Retrieve detailed budget information from Brex financial platform using a specific budget ID to access spending limits, allocations, and financial data for analysis and reporting.

Instructions

Get a budget by ID (read-only). Returns the complete budget object. Example: {"budget_id":"budget_123"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idYesThe ID of the budget to retrieve

Implementation Reference

  • Main execution handler for the 'get_budget' tool: validates input, fetches budget via BrexClient.getBudget, returns JSON response.
    registerToolHandler("get_budget", async (request: ToolCallRequest) => { try { const params = validateParams(request.params.arguments); const client = getBrexClient(); const budget = await client.getBudget(params.budget_id); return { content: [{ type: "text", text: JSON.stringify({ budget }, null, 2) }] }; } catch (error) { logError(`Error in get_budget: ${error instanceof Error ? error.message : String(error)}`); throw error; } });
  • Type definition and validation logic for get_budget input parameters.
    interface GetBudgetParams { budget_id: string; } function validateParams(input: unknown): GetBudgetParams { const raw = (input || {}) as Record<string, unknown>; if (!raw.budget_id) throw new Error("Missing required parameter: budget_id"); return { budget_id: String(raw.budget_id) }; }
  • Official MCP input schema for the 'get_budget' tool in the listTools handler.
    { name: "get_budget", description: "Get a budget by ID (read-only). Returns the complete budget object. Example: {\"budget_id\":\"budget_123\"}", inputSchema: { type: "object", properties: { budget_id: { type: "string", description: "The ID of the budget to retrieve" } }, required: ["budget_id"] } },
  • Tool registration call within registerTools function.
    registerGetBudgetById(server);
  • src/index.ts:48-48 (registration)
    Top-level server registration that includes get_budget tool.
    registerTools(server);

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/crazyrabbitLTC/mcp-brex-server'

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