Skip to main content
Glama
PaddleHQ

Paddle MCP Server

Official
by PaddleHQ

get_subscription

Read-only

Retrieve a Paddle subscription by ID to view details and optionally include previews of upcoming or recurring transactions.

Instructions

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

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

  • next_transaction: Include an object with a preview of the next transaction for this subscription. May include prorated charges that aren't yet billed and one-time charges.

  • recurring_transaction_details: Include an object with a preview of the recurring transaction for this subscription. This is what the customer can expect to be billed when there are no prorated or one-time charges.

Input Schema

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

Implementation Reference

  • The handler function that implements the core logic of the 'get_subscription' tool. It retrieves a specific subscription using the Paddle SDK by subscription ID, optionally with additional query parameters, and handles errors by returning them.
    export const getSubscription = async (paddle: Paddle, params: z.infer<typeof Parameters.getSubscriptionParameters>) => {
      try {
        const { subscriptionId, ...queryParams } = params;
        const hasQueryParams = Object.keys(queryParams).length > 0;
        const subscription = await paddle.subscriptions.get(subscriptionId, hasQueryParams ? queryParams : undefined);
        return subscription;
      } catch (error) {
        return error;
      }
    };
  • The tool schema definition in the tools array, specifying the method name, description, parameters schema (referencing params.getSubscriptionParameters), and required actions for the 'get_subscription' tool.
    {
      method: "get_subscription",
      name: "Get a subscription",
      description: prompts.getSubscriptionPrompt,
      parameters: params.getSubscriptionParameters,
      actions: {
        subscriptions: {
          read: true,
          get: true,
        },
      },
    },
  • src/api.ts:75-75 (registration)
    Registration of the getSubscription handler function in the toolMap object in PaddleAPI, mapping the TOOL_METHODS.GET_SUBSCRIPTION constant to the function for execution.
    [TOOL_METHODS.GET_SUBSCRIPTION]: funcs.getSubscription,
  • src/constants.ts:67-67 (registration)
    Constant definition for the tool method name 'get_subscription' used in registration and tool definitions.
    GET_SUBSCRIPTION: "get_subscription",
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 what the 'include' parameter does (e.g., 'next_transaction' includes prorated charges, 'recurring_transaction_details' shows expected billing), which helps the agent understand response behavior. No contradictions with annotations are present.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by specific usage details for the 'include' parameter. Every sentence adds value without redundancy, making it efficient and well-structured.

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 moderate complexity (2 parameters, read-only operation), the description is fairly complete. It covers purpose, parameter usage, and behavioral details. However, with no output schema, it doesn't describe the return format (e.g., subscription object structure), leaving a minor gap. Annotations help by indicating safety.

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?

Schema description coverage is 100%, so the schema already documents parameters. The description adds semantic meaning by explaining the purpose and options of the 'include' parameter (e.g., 'next_transaction' includes unbilled charges), which goes beyond the schema's enum list. This compensates well, though it doesn't detail 'subscriptionId' further.

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 subscription from Paddle by its ID.' This is a specific verb ('retrieve') and resource ('subscription'), but it doesn't explicitly differentiate from sibling tools like 'list_subscriptions' or 'get_customer' (which might also retrieve subscription data). The description is clear but lacks sibling differentiation.

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 provides implied usage guidance by explaining the 'include' parameter for related entities, suggesting when to use this tool for detailed subscription data. However, it doesn't explicitly state when to choose this over alternatives like 'list_subscriptions' for bulk data or other 'get_' tools for different resources. The guidance is contextual but not comprehensive.

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