Skip to main content
Glama
crazyrabbitLTC

Brex MCP Server

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);
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the operation is read-only and returns a complete budget object, which is useful behavioral context. However, it lacks details on error handling, permissions, or rate limits.

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 front-loaded with the core purpose, followed by a clarifying note and an example. Every sentence earns its place with no wasted words, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only tool with 100% schema coverage but no output schema, the description is adequate but could be more complete. It covers the basic operation and return type, but lacks details on response structure or potential edge cases given the context of sibling tools.

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?

Schema description coverage is 100%, so the schema already documents the 'budget_id' parameter. The description adds minimal value with an example but does not provide additional syntax or format details beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('a budget by ID'), specifying it retrieves a complete budget object. It distinguishes from sibling tools like 'get_budgets' (plural) by focusing on single-budget retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by stating 'by ID' and provides an example, but does not explicitly guide when to use this tool versus alternatives like 'get_budgets' or other retrieval tools. No exclusions or prerequisites are mentioned.

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

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