Skip to main content
Glama

relay_runs_list

List recent workflow runs for debugging and reference, enabling efficient AI workflow orchestration by chaining multi-step LLM operations.

Instructions

List recent workflow runs for debugging and reference.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of runs to return (default: 10, max: 50)

Implementation Reference

  • The core handler function for the 'relay_runs_list' tool. Fetches recent runs from the run store, computes summaries with metrics like duration, tokens, cost, and trace URLs, and returns the formatted list.
    export async function relayRunsList( input: RelayRunsListInput ): Promise<RelayRunsListResponse> { const limit = input.limit || 10; const runs = getRecentRuns(limit); const config = getConfig(); const summaries: RunSummary[] = runs.map((run: RunRecord) => ({ 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(), durationMs: run.durationMs, totalTokens: run.usage.totalTokens, estimatedCostUsd: run.usage.estimatedProviderCostUsd, traceUrl: `${config.traceUrlBase}/${run.runId}`, contextReduction: run.contextReduction, })); return { runs: summaries, total: summaries.length, }; }
  • Zod schema defining the input parameters for the relay_runs_list tool, including an optional limit for the number of runs.
    export const relayRunsListSchema = z.object({ limit: z .number() .min(1) .max(50) .optional() .describe('Number of runs to return (default: 10, max: 50)'), });
  • MCP tool definition object specifying the name, description, and input schema structure for registration.
    export const relayRunsListDefinition = { name: 'relay_runs_list', description: 'List recent workflow runs for debugging and reference.', inputSchema: { type: 'object' as const, properties: { limit: { type: 'number', description: 'Number of runs to return (default: 10, max: 50)', }, }, }, };
  • src/server.ts:59-67 (registration)
    Array of all tool definitions, including relayRunsListDefinition, registered with the MCP server's listTools request handler.
    const TOOLS = [ relayModelsListDefinition, relayRunDefinition, relayWorkflowRunDefinition, relayWorkflowValidateDefinition, relaySkillsListDefinition, relayRunsListDefinition, relayRunGetDefinition, ];
  • Dispatch logic in the MCP callTool request handler: parses arguments with the tool schema and invokes the relayRunsList handler function.
    case 'relay_runs_list': { const parsed = relayRunsListSchema.parse(args || {}); result = await relayRunsList(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