Skip to main content
Glama

list_transactions

Read-onlyIdempotent

View complete billing history including top-ups, call charges, number rentals, and refunds to track telephony expenses and account activity.

Instructions

List billing transactions — top-ups, call charges, number rentals, refunds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler implementation for list_transactions tool - executes the API call to fetch billing transactions
    server.registerTool(
      "list_transactions",
      {
        description: "List billing transactions — top-ups, call charges, number rentals, refunds.",
        inputSchema: {},
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      },
      async () => callTool(() => client.get("/billing/transactions"))
    );
  • Registration of the list_transactions tool with the MCP server including metadata and handler binding
    server.registerTool(
      "list_transactions",
      {
        description: "List billing transactions — top-ups, call charges, number rentals, refunds.",
        inputSchema: {},
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      },
      async () => callTool(() => client.get("/billing/transactions"))
    );
  • Input schema definition for list_transactions - empty object indicates no parameters required
    description: "List billing transactions — top-ups, call charges, number rentals, refunds.",
    inputSchema: {},
  • callTool helper function that wraps tool execution with standardized error handling and result formatting
    async function callTool<T>(fn: () => Promise<T>) {
      try {
        return toolResult(await fn());
      } catch (err) {
        const apiErr = err as ApiError;
        return toolError(`API error (${apiErr.status}): ${apiErr.message}`);
      }
    }
  • BubblyPhoneClient.get() method that makes the actual HTTP GET request to the billing/transactions endpoint
    async get<T = unknown>(path: string, params?: Record<string, string>): Promise<T> {
      const url = new URL(`${this.baseUrl}${path}`);
      if (params) {
        for (const [key, value] of Object.entries(params)) {
          if (value !== undefined && value !== "") {
            url.searchParams.set(key, value);
          }
        }
      }
      return this.request<T>(url.toString(), { method: "GET" });
    }
Behavior4/5

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

Annotations already declare read-only, safe, idempotent characteristics. The description adds valuable behavioral context by disclosing the specific transaction types returned (top-ups, charges, rentals, refunds), which defines the scope of data without contradicting the safety annotations.

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?

Extremely concise single sentence with high information density. The em-dash construction front-loads the action and efficiently enumerates example transaction types with zero redundancy.

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

Completeness4/5

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

Appropriate for a simple read-only list tool with no input parameters. The description compensates for the missing output schema by enumerating the transaction types returned. Could mention pagination or time range behavior, but the content is sufficient for tool selection given the rich annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With zero parameters, the baseline score applies. The description appropriately focuses on the return value semantics rather than parameters, which is correct for a parameterless list operation.

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?

Specific verb 'List' with clear resource 'billing transactions'. The enumerated examples (top-ups, call charges, number rentals, refunds) effectively distinguish this from siblings like list_calls, get_usage, or get_balance by specifying the exact nature of the records returned.

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 transaction type examples (top-ups, refunds, etc.) provide implied usage context for when to retrieve billing history. However, it lacks explicit guidance contrasting this with get_balance (current balance) or get_usage (aggregates), and does not state when NOT to use it.

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

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