Skip to main content
Glama
PaddleHQ

Paddle MCP Server

Official
by PaddleHQ

list_simulation_runs

Read-only

Retrieve and manage simulation runs in Paddle Billing with pagination, filtering, and event inclusion for comprehensive analysis.

Instructions

This tool will list simulation runs in Paddle.

Use the maximum perPage by default (200) to ensure comprehensive results. Filter simulationRuns by id as needed. Results are paginated - use the 'after' parameter with the last ID from previous results to get the next page. Sort and order results using the orderBy parameter.

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

  • events: An array of events entities for events sent by this simulation run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
simulationIdYesPaddle ID of the simulation to list runs for.
afterNoReturn entities after the specified Paddle ID when working with paginated endpoints.
includeNoInclude related entities in the response.
orderByNoOrder returned entities by the specified field and direction.
perPageNoSet how many entities are returned per page. Returns the maximum number of results if a number greater than the maximum is requested.
idNoReturn only the IDs specified. Use a comma-separated list to get multiple entities.

Implementation Reference

  • The main execution handler for the 'list_simulation_runs' tool. It destructures simulationId and queryParams from input, lists simulation runs using the Paddle SDK's simulationRuns.list method, fetches the first page with next(), computes pagination data, and returns the results with pagination info. Handles errors by returning the error object.
    export const listSimulationRuns = async (
      paddle: Paddle,
      params: z.infer<typeof Parameters.listSimulationRunsParameters>,
    ) => {
      try {
        const { simulationId, ...queryParams } = params;
        const collection = paddle.simulationRuns.list(simulationId, queryParams);
        const simulationRuns = await collection.next();
        const pagination = paginationData(collection);
        return { pagination, simulationRuns };
      } catch (error) {
        return error;
      }
    };
  • Defines the tool schema for 'list_simulation_runs' including the method name, human-readable name, description prompt, Zod parameters schema (imported as params.listSimulationRunsParameters), and required actions (read/list on simulationRuns). This is used for tool registration and validation.
    method: "list_simulation_runs",
    name: "List runs for a simulation",
    description: prompts.listSimulationRunsPrompt,
    parameters: params.listSimulationRunsParameters,
    actions: {
      simulationRuns: {
        read: true,
        list: true,
      },
    },
  • src/api.ts:59-59 (registration)
    Registers the 'list_simulation_runs' tool by mapping TOOL_METHODS.LIST_SIMULATION_RUNS to the handler funcs.listSimulationRuns in the toolMap object, which is used by PaddleAPI.run() to dispatch tool calls to the correct handler.
    [TOOL_METHODS.LIST_SIMULATION_RUNS]: funcs.listSimulationRuns,
  • src/constants.ts:51-51 (registration)
    Defines the constant TOOL_METHODS.LIST_SIMULATION_RUNS as 'list_simulation_runs', used across the codebase for consistent tool method naming in registrations and references.
    LIST_SIMULATION_RUNS: "list_simulation_runs",
  • Provides the descriptive prompt for the 'list_simulation_runs' tool, explaining usage, parameters like perPage/after/orderBy/include, and response structure. Used in tool schema for LLM guidance.
    export const listSimulationRunsPrompt = `
    This tool will list simulation runs in Paddle.
    
    Use the maximum perPage by default (200) to ensure comprehensive results.
    Filter simulationRuns by id as needed.
    Results are paginated - use the 'after' parameter with the last ID from previous results to get the next page.
    Sort and order results using the orderBy parameter.
    
    Use the include parameter to include related entities in the response:
    
    - events: An array of events entities for events sent by this simulation run.
    `;
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 specifies pagination behavior ('Results are paginated'), default usage ('Use the maximum perPage by default'), and what the 'include' parameter does (including related entities like events). 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.

Conciseness4/5

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

The description is well-structured and appropriately sized, with clear sentences that each serve a purpose: stating the tool's function, providing usage tips, and explaining the 'include' parameter. It's front-loaded with the core purpose and avoids redundancy, though it could be slightly more concise by integrating some tips into the parameter explanations.

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 (6 parameters, pagination, filtering), the description is reasonably complete. It covers key behavioral aspects like pagination and default usage, and with annotations indicating read-only operation and no output schema, it doesn't need to explain return values. However, it could benefit from more explicit guidance on when to use versus sibling tools.

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 fully documents all 6 parameters. The description adds some semantic context, such as recommending default values for 'perPage' and explaining how 'after' works with pagination, but doesn't provide significant additional meaning beyond what's in the schema. This meets 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: 'list simulation runs in Paddle.' It specifies the resource (simulation runs) and verb (list), but doesn't explicitly differentiate from sibling tools like 'list_simulation_run_events' or 'get_simulation_run' beyond the resource name. The purpose is clear but lacks sibling distinction.

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 through parameter explanations (e.g., 'use the maximum perPage by default,' 'use the 'after' parameter... to get the next page'), but doesn't explicitly state when to use this tool versus alternatives like 'get_simulation_run' for single runs or 'list_simulation_run_events' for events. It offers practical tips but no direct comparative context.

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