Skip to main content
Glama
PaddleHQ
by PaddleHQ

list_simulation_runs

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. `;

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