Skip to main content
Glama
PaddleHQ

Paddle MCP Server

Official
by PaddleHQ

get_transaction_invoice

Read-only

Retrieve a temporary link to download or view transaction invoice PDFs from Paddle for payment verification and tax reporting purposes.

Instructions

This tool will retrieve a link to an invoice PDF for a transaction from Paddle.

Invoice PDFs are available for both automatically and manually-collected transactions:

  • The PDF for manually-collected transactions includes payment terms, purchase order number, and notes for the customer. It's a demand for payment from the customer. Available for transactions billed or completed.

  • The PDF for automatically-collected transactions lets the customer know that payment was taken successfully. Customers may require this for for tax-reporting purposes. Available for transactions completed.

Invoice PDFs aren't available for zero-value transactions.

The link returned isn't a permanent link. It expires after an hour.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionIdYesPaddle ID of the transaction.
dispositionNoDetermine whether the generated URL should download the PDF as an attachment saved locally, or open it inline in the browser. If omitted, defaults to `attachment`.

Implementation Reference

  • The main handler function that retrieves the invoice PDF for a given transaction ID using the Paddle SDK. Handles optional query parameters and returns the result or error.
    export const getTransactionInvoice = async (
      paddle: Paddle,
      params: z.infer<typeof Parameters.getTransactionInvoiceParameters>,
    ) => {
      try {
        const { transactionId, ...queryParams } = params;
        const hasQueryParams = Object.keys(queryParams).length > 0;
        const transaction = await paddle.transactions.getInvoicePDF(
          transactionId,
          hasQueryParams ? queryParams : undefined,
        );
        return transaction;
      } catch (error) {
        return error;
      }
    };
  • Defines the tool configuration including the method name, human-readable name, description prompt, Zod input schema reference, and required permissions (read and get on transactions). Used for MCP tool registration.
      method: "get_transaction_invoice",
      name: "Get a PDF invoice for a transaction",
      description: prompts.getTransactionInvoicePrompt,
      parameters: params.getTransactionInvoiceParameters,
      actions: {
        transactions: {
          read: true,
          get: true,
        },
      },
    },
  • src/api.ts:65-65 (registration)
    Registers the getTransactionInvoice handler function under the tool method constant in the toolMap. This mapping is used by PaddleAPI.run() to dispatch calls to the correct function.
    [TOOL_METHODS.GET_TRANSACTION_INVOICE]: funcs.getTransactionInvoice,
  • Exports the string constant for the tool method name, used in tool mappings, registrations, and configurations across the codebase.
    GET_TRANSACTION_INVOICE: "get_transaction_invoice",
  • Provides the detailed description/prompt for the tool, explaining usage, availability conditions, and link expiration. Referenced in tools.ts.
    export const getTransactionInvoicePrompt = `
    This tool will retrieve a link to an invoice PDF for a transaction from Paddle.
    
    Invoice PDFs are available for both automatically and manually-collected transactions:
    
    - The PDF for manually-collected transactions includes payment terms, purchase order number, and notes for the customer. It's a demand for payment from the customer. Available for transactions billed or completed.
    - The PDF for automatically-collected transactions lets the customer know that payment was taken successfully. Customers may require this for for tax-reporting purposes. Available for transactions completed.
    
    Invoice PDFs aren't available for zero-value transactions.
    
    The link returned isn't a permanent link. It expires after an hour.
    `;
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 annotations: it explains that the link expires after an hour, details differences between transaction types (e.g., manually-collected vs. automatically-collected), and mentions tax-reporting purposes. It does not contradict annotations, as 'retrieve' aligns with read-only behavior.

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 well-structured and concise, using bullet points to organize information about transaction types and availability. Every sentence adds value (e.g., explaining link expiration, transaction distinctions, and exclusions), with no redundant or wasted text. It is front-loaded with the core purpose.

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

Completeness5/5

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

Given the tool's moderate complexity (2 parameters, no output schema), the description is highly complete. It covers purpose, usage guidelines, behavioral details (link expiration, transaction types), and exclusions (zero-value transactions). With annotations covering safety and schema covering parameters, no significant gaps remain.

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%, with clear descriptions for both parameters (transactionId and disposition). The description does not add any parameter-specific semantics beyond what the schema provides (e.g., it doesn't explain transactionId format or disposition implications further). Baseline 3 is appropriate as the schema adequately documents parameters.

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 tool's purpose: 'retrieve a link to an invoice PDF for a transaction from Paddle.' It specifies the resource (invoice PDF) and the action (retrieve a link), distinguishing it from sibling tools like 'get_transaction' which likely returns transaction data rather than invoice links. The description is specific and unambiguous.

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

Usage Guidelines4/5

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

The description provides clear context on when to use this tool by detailing availability for automatically and manually-collected transactions, and explicitly stating it's not available for zero-value transactions. However, it does not explicitly compare to alternatives (e.g., when to use 'get_transaction' vs. this tool for invoice-related needs), which prevents a perfect score.

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