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;
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool is for listing runs 'for debugging and reference', which implies read-only behavior, but doesn't specify details like pagination, sorting, error handling, or authentication requirements. This leaves significant gaps for a tool that likely interacts with workflow data.

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 a single, efficient sentence that states the core purpose upfront. It avoids unnecessary words, though it could be slightly more structured by separating purpose from usage context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., list format, fields included), how 'recent' is defined, or other behavioral aspects needed for effective use. For a tool with potential complexity in workflow runs, this is insufficient.

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?

The input schema has 100% description coverage, with the 'limit' parameter well-documented. The description doesn't add any parameter-specific information beyond what the schema provides, so it meets the baseline score of 3 for adequate but no extra value.

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 verb ('List') and resource ('recent workflow runs'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'relay_run_get' or 'relay_workflow_run', which likely have related but distinct purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance with 'for debugging and reference', but it doesn't specify when to use this tool versus alternatives like 'relay_run_get' or 'relay_workflow_run'. No explicit when-not-to-use or prerequisite information is included.

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

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