Skip to main content
Glama

relay_run_get

Retrieve detailed execution data for a specific workflow run, including step outputs and trace information, to monitor and analyze AI orchestration processes.

Instructions

Get full details of a specific run including all step outputs and trace URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdYesThe run ID to retrieve

Implementation Reference

  • Core implementation of the 'relay_run_get' tool handler. Fetches run data by ID, formats timestamps and trace URL, handles missing runs.
    export async function relayRunGet( input: RelayRunGetInput ): Promise<RelayRunGetResponse> { const run = getRunById(input.runId); const config = getConfig(); if (!run) { return { found: false, error: `Run with ID "${input.runId}" not found. Note: Run history is stored in memory and clears on server restart.`, }; } return { found: true, run: { runId: run.runId, type: run.type, name: run.type === 'workflow' ? run.workflowName : undefined, model: run.type === 'single' ? run.model : undefined, success: run.success, startTime: run.startTime.toISOString(), endTime: run.endTime.toISOString(), durationMs: run.durationMs, usage: run.usage, input: run.input, output: run.output, steps: run.steps, error: run.error, traceUrl: `${config.traceUrlBase}/${run.runId}`, contextReduction: run.contextReduction, }, }; }
  • Input schema (Zod), input type, and response interface for the tool.
    export const relayRunGetSchema = z.object({ runId: z.string().describe('The run ID to retrieve'), }); export type RelayRunGetInput = z.infer<typeof relayRunGetSchema>; export interface RelayRunGetResponse { found: boolean; run?: { runId: string; type: 'single' | 'workflow'; name?: string; model?: string; success: boolean; startTime: string; endTime: string; durationMs: number; usage: { promptTokens: number; completionTokens: number; totalTokens: number; estimatedProviderCostUsd: number; }; input?: any; output?: any; steps?: Record<string, any>; error?: string; traceUrl: string; contextReduction?: string; }; error?: string; }
  • MCP tool definition including name, description, and JSON schema for input validation.
    export const relayRunGetDefinition = { name: 'relay_run_get', description: 'Get full details of a specific run including all step outputs and trace URL.', inputSchema: { type: 'object' as const, properties: { runId: { type: 'string', description: 'The run ID to retrieve', }, }, required: ['runId'], }, };
  • src/server.ts:59-67 (registration)
    Registers the tool by including its definition in the TOOLS array returned by listTools MCP handler.
    const TOOLS = [ relayModelsListDefinition, relayRunDefinition, relayWorkflowRunDefinition, relayWorkflowValidateDefinition, relaySkillsListDefinition, relayRunsListDefinition, relayRunGetDefinition, ];
  • Server-side dispatch for the tool call: parses input with schema and invokes the handler function.
    case 'relay_run_get': { const parsed = relayRunGetSchema.parse(args); result = await relayRunGet(parsed); break;

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/RelayPlane/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server