Skip to main content
Glama

get_bill_run

Retrieve a bill run's details by supplying its unique identifier.

Instructions

Get a bill run by ID. GET /bill-run/{billRunId}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
billRunIdYesBill run ID (required)

Implementation Reference

  • The handler function that executes the get_bill_run tool logic. Validates input with Zod schema, then calls billRunService.getBillRun.
    async function handler(client: Client, args: Record<string, unknown> | undefined) {
      const parsed = schema.safeParse(args);
      if (!parsed.success) {
        return errorResult(parsed.error.errors.map((e) => e.message).join("; "));
      }
      return handleToolCall(() =>
        billRunService.getBillRun(client, parsed.data.billRunId)
      );
    }
  • Zod validation schema requiring billRunId (non-empty string).
    const schema = z.object({
      billRunId: z.string().min(1, "billRunId is required"),
    });
  • Tool definition registering the name 'get_bill_run' with input schema and description.
    const definition = {
      name: "get_bill_run",
      description: "Get a bill run by ID. GET /bill-run/{billRunId}.",
      inputSchema: {
        type: "object" as const,
        properties: {
          billRunId: { type: "string", description: "Bill run ID (required)" },
        },
        required: ["billRunId"],
      },
    };
  • Registration of getBillRunTool in the registerBillRunTools() array.
    export function registerBillRunTools(): Tool[] {
      return [
        listBillRunsTool,
        getBillRunTool,
        updateBillRunTool,
        getBillRunInvoicesTool,
      ];
    }
    
    export { listBillRunsTool } from "./listBillRuns.js";
    export { getBillRunTool } from "./getBillRun.js";
    export { updateBillRunTool } from "./updateBillRun.js";
    export { getBillRunInvoicesTool } from "./getBillRunInvoices.js";
  • Service function that makes the actual GET /bill-run/{billRunId} API call.
    /** GET /bill-run/{billRunId} */
    export async function getBillRun(
      client: Client,
      billRunId: string
    ): Promise<unknown> {
      return client.get<unknown>(`/bill-run/${billRunId}`);
    }
Behavior2/5

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

No annotations provided, and the description merely repeats the endpoint URL. It fails to disclose that the tool is read-only, what happens if the billRunId is invalid, or any required permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences are concise and front-loaded. However, the second sentence is redundant as it mirrors the first; one sentence would suffice.

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 get-by-ID operation, the description covers the essential purpose. However, lacking any behavioral or usage context (e.g., response format, error handling) leaves gaps compared to well-documented 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?

Input schema has 100% coverage, so the schema already documents the billRunId parameter. The description adds no additional meaning or constraints 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?

Description explicitly states 'Get a bill run by ID' with a clear verb-resource structure. It distinguishes itself from sibling tools like list_bill_runs (which returns a list) and update_bill_run (which modifies).

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?

No guidance on when to use this tool versus alternatives. There is no mention of prerequisites like having a valid billRunId or that list_bill_runs should be used to find IDs first.

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/rhinosaas/rebillia-mcp-server'

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