Skip to main content
Glama
PaddleHQ

Paddle MCP Server

Official
by PaddleHQ

get_client_side_token

Read-only

Retrieve a client-side token by ID for initializing Paddle.js in sandbox or production environments, with status indicators for active or revoked tokens.

Instructions

This tool will retrieve a client-side token from Paddle by its ID.

The returned token field is the client-side token that needs to be provided when initializing Paddle.js. Can be exposed client-side safely. If it starts with:

  • test_: The token is a test token for a sandbox environment and shouldn't be used in production.

  • live_: The token is a live token for a production environment. It can be used to test too but Paddle.js checkouts require real cards.

Client-side tokens have a status:

  • active: Client-side token can be used to authenticate with Paddle.js.

  • revoked: Client-side token has been revoked and can no longer be used to authenticate with Paddle.js.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientTokenIdYesPaddle ID of the client-side token.

Implementation Reference

  • The handler function that implements the core logic for the 'get_client_side_token' tool. It takes a Paddle instance and parameters including clientTokenId, retrieves the client-side token using paddle.clientTokens.get, and returns it or any error.
    export const getClientSideToken = async (paddle: Paddle, params: z.infer<typeof Parameters.getClientSideTokenParameters>) => {
      try {
        const { clientTokenId } = params;
        const clientSideToken = await paddle.clientTokens.get(clientTokenId);
        return clientSideToken;
      } catch (error) {
        return error;
      }
    };
  • The schema definition for the MCP tool 'get_client_side_token', including method name, description prompt, parameters schema reference, and required actions (read and get on clientSideTokens).
      method: "get_client_side_token",
      name: "Get a client-side token",
      description: prompts.getClientSideTokenPrompt,
      parameters: params.getClientSideTokenParameters,
      actions: {
        clientSideTokens: {
          read: true,
          get: true,
        },
      },
    },
  • src/api.ts:89-93 (registration)
    Registration of the getClientSideToken handler function in the toolMap object used by PaddleAPI to dispatch tool method calls to the appropriate handler.
      [TOOL_METHODS.LIST_CLIENT_SIDE_TOKENS]: funcs.listClientSideTokens,
      [TOOL_METHODS.CREATE_CLIENT_SIDE_TOKEN]: funcs.createClientSideToken,
      [TOOL_METHODS.GET_CLIENT_SIDE_TOKEN]: funcs.getClientSideToken,
      [TOOL_METHODS.REVOKE_CLIENT_SIDE_TOKEN]: funcs.revokeClientSideToken,
    };
  • src/toolkit.ts:69-85 (registration)
    Dynamic registration of the tool in the MCP server via this.tool() call in the loop over tools array, mapping to PaddleAPI.run(tool.method, arg).
    this.tool(
      tool.method,
      tool.description,
      tool.parameters.shape,
      annotations,
      async (arg: unknown, _extra: unknown) => {
        const result = await this._paddle.run(tool.method, arg);
        return {
          content: [
            {
              type: "text" as const,
              text: String(result),
            },
          ],
        };
      },
    );
  • Constant definition for the tool method string used in TOOL_METHODS and mappings.
    GET_CLIENT_SIDE_TOKEN: "get_client_side_token",
Behavior4/5

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

Annotations already declare readOnlyHint=true, indicating a safe read operation. The description adds valuable behavioral context beyond this: it explains the token's purpose (initializing Paddle.js), safety considerations (can be exposed client-side), environment distinctions (test_ vs. live_ prefixes), and token statuses (active/revoked). This enhances the agent's understanding without contradicting 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?

The description is well-structured and front-loaded, starting with the core purpose, followed by usage context and behavioral details. Each sentence adds value: the first states the action, the second explains the token's use, and the subsequent ones cover safety, environment prefixes, and statuses—with zero wasted content.

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 simplicity (one parameter, read-only operation) and lack of an output schema, the description provides comprehensive context: it covers purpose, usage, behavioral traits, and output interpretation (token prefixes and statuses). However, it does not explicitly describe the return format or error handling, leaving minor gaps.

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?

The input schema has 100% description coverage, with the parameter 'clientTokenId' clearly documented as 'Paddle ID of the client-side token.' The description does not add further parameter details beyond what the schema provides, so it meets the baseline of 3 for high schema coverage.

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 specific action ('retrieve a client-side token') and resource ('from Paddle by its ID'), distinguishing it from sibling tools like 'list_client_side_tokens' (which lists multiple tokens) and 'create_client_side_token' (which creates new tokens). It precisely defines what the tool does without ambiguity.

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 (to retrieve a specific token by ID) and implicitly distinguishes it from 'list_client_side_tokens' for bulk retrieval. However, it lacks explicit guidance on when NOT to use it or alternatives for related operations like token creation or listing.

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