Skip to main content
Glama
PaddleHQ
by PaddleHQ

get_simulation_run

Retrieve a simulation run from Paddle by its ID, optionally including related events to analyze the simulation's outcomes.

Instructions

This tool will retrieve a simulation run from Paddle by its ID.

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 entity associated with the run.
simulationRunIdYesPaddle ID of the simulation run entity.
includeYesInclude related entities in the response.

Implementation Reference

  • The core handler function that implements the get_simulation_run tool by calling the Paddle SDK's simulationRuns.get method with the provided simulationId, simulationRunId, and optional query parameters.
    export const getSimulationRun = async ( paddle: Paddle, params: z.infer<typeof Parameters.getSimulationRunParameters>, ) => { try { const { simulationId, simulationRunId, ...queryParams } = params; const hasQueryParams = Object.keys(queryParams).length > 0; const simulationRun = await paddle.simulationRuns.get( simulationId, simulationRunId, hasQueryParams ? queryParams : undefined, ); return simulationRun; } catch (error) { return error; } };
  • Defines the MCP tool schema including the Zod parameters schema (params.getSimulationRunParameters), description prompt, name, and required permissions/actions for the get_simulation_run tool.
    method: "get_simulation_run", name: "Get a run for a simulation", description: prompts.getSimulationRunPrompt, parameters: params.getSimulationRunParameters, actions: { simulationRuns: { read: true, get: true, }, }, },
  • src/api.ts:61-61 (registration)
    Registers the getSimulationRun handler in the toolMap object, mapping the constant TOOL_METHODS.GET_SIMULATION_RUN to the function for execution in PaddleAPI.run.
    [TOOL_METHODS.GET_SIMULATION_RUN]: funcs.getSimulationRun,
  • src/constants.ts:53-53 (registration)
    Defines the constant TOOL_METHODS.GET_SIMULATION_RUN used for tool identification in registration and tool definitions.
    GET_SIMULATION_RUN: "get_simulation_run",
  • The dynamic registration loop in PaddleMCPServer that registers all filtered tools (including get_simulation_run) with the MCP server using the tool definitions from tools.ts and delegates execution to PaddleAPI.
    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), }, ], }; }, );

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