Skip to main content
Glama
PaddleHQ

Paddle MCP Server

Official
by PaddleHQ

get_transaction

Read-only

Retrieve a transaction from Paddle Billing by its ID, with options to include related entities like customer, address, adjustments, and business details.

Instructions

This tool will retrieve a transaction from Paddle by its ID.

Use the include parameter to include related entities in the response:

  • address: An object for the address entity related to this transaction. Only returned if an address is set against the transaction.

  • adjustments: An array of adjustment entities related to this transaction. Only returned if adjustments have been created against the transaction.

  • adjustments_totals: An object containing totals for all adjustments on a transaction. Only returned if adjustments have been created against the transaction.

  • available_payment_methods: An array of payment methods that are available to use for this transaction.

  • business: An object for the business entity related to this transaction. Only returned if a business is set against the transaction.

  • customer: An object for the customer entity related to this transaction. Only returned if a customer is set against the transaction.

  • discount: An object for the discount entity related to this transaction. Only returned if a discount is set against the transaction.

Transactions have a collectionMode that determines how Paddle tries to collect for payment:

  • automatic: Payment is collected automatically using a checkout initially, then using a payment method on file.

  • manual: Payment is collected manually. Customers are sent an invoice with payment terms and can make a payment offline or using a checkout. Requires billingDetails.

Transactions have a status that determines the current state of the transaction:

  • draft: Transaction is missing required fields. Typically the first stage of a checkout before customer details are captured.

  • ready: Transaction has all of the required fields to be marked as billed or completed.

  • billed: Transaction has been updated to billed. Billed transactions get an invoice number and are considered a legal record. They can't be changed. Typically used as part of an invoice workflow.

  • paid: Transaction is fully paid, but has not yet been processed internally.

  • completed: Transaction is fully paid and processed.

  • canceled: Transaction has been updated to canceled. If an invoice, it's no longer due.

  • past_due: Transaction is past due. Occurs for automatically-collected transactions when the related subscription is in dunning, and for manually-collected transactions when payment terms have elapsed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionIdYesPaddle ID of the transaction.
includeNoInclude related entities in the response. Use a comma-separated list to specify multiple entities.

Implementation Reference

  • The core handler function that executes the 'get_transaction' tool logic. It takes a transactionId and optional query parameters, calls the Paddle SDK's transactions.get method, and returns the transaction data or error.
    export const getTransaction = async (paddle: Paddle, params: z.infer<typeof Parameters.getTransactionParameters>) => {
      try {
        const { transactionId, ...queryParams } = params;
        const hasQueryParams = Object.keys(queryParams).length > 0;
        const transaction = await paddle.transactions.get(transactionId, hasQueryParams ? queryParams : undefined);
        return transaction;
      } catch (error) {
        return error;
      }
  • src/tools.ts:396-407 (registration)
    Tool registration/definition in the tools array, specifying the method name, description, input schema (parameters), and required actions/permissions.
    {
      method: "get_transaction",
      name: "Get a transaction",
      description: prompts.getTransactionPrompt,
      parameters: params.getTransactionParameters,
      actions: {
        transactions: {
          read: true,
          get: true,
        },
      },
    },
  • Reference to the Zod input schema for validating parameters of the get_transaction tool.
    parameters: params.getTransactionParameters,
  • src/api.ts:22-22 (registration)
    Maps the TOOL_METHODS.GET_TRANSACTION constant to the getTransaction handler function in the toolMap object used by PaddleAPI.
    [TOOL_METHODS.GET_TRANSACTION]: funcs.getTransaction,
  • Constant definition for the tool method name used across the codebase.
    GET_TRANSACTION: "get_transaction",
Behavior4/5

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

Annotations provide readOnlyHint=true, indicating a safe read operation. The description adds valuable behavioral context beyond this: it explains the 'collectionMode' (automatic vs. manual) and detailed 'status' values (draft, ready, billed, etc.) with their meanings. This significantly enhances understanding of transaction states, though it doesn't cover rate limits or auth needs.

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

Conciseness3/5

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

The description is front-loaded with the core purpose, but it becomes verbose with detailed explanations of 'include' values, 'collectionMode,' and 'status.' While informative, some of this could be streamlined or moved to a separate section, as not every sentence directly aids tool selection in a concise manner.

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?

Given the tool's complexity (retrieval with optional includes and transaction states), the description provides substantial context: it explains parameters, related entities, and transaction behaviors. With annotations covering read-only safety and no output schema, it compensates well, though it could briefly mention response format or error handling for a higher score.

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 both parameters. The description adds context for the 'include' parameter by listing and explaining each possible value (e.g., 'address' includes address entity if set). However, it doesn't provide additional syntax or format details beyond what the schema implies, meeting the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'retrieve a transaction from Paddle by its ID.' This is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'get_transaction_invoice' or 'list_transactions,' which would be needed for a perfect score.

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 explaining the 'include' parameter for related entities, but doesn't explicitly state when to use this tool versus alternatives like 'list_transactions' or 'get_transaction_invoice.' It provides context on what the tool does but lacks explicit guidance on when to choose it over siblings.

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

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