Skip to main content
Glama

get_run

Retrieve the current summary status of a known orchestration run to monitor task progress and manage subagent execution across coding backends.

Instructions

Get the current summary status for a known run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYes
roleYes
run_idYes
statusYes
backendYes
summaryYes
last_seqYes
metadataYes
remote_refYes
session_idYes
started_atYes
updated_atYes

Implementation Reference

  • The main handler method that executes the get_run tool logic. It first checks for an active run in memory, then falls back to reading from storage. Returns the run status and metadata.
    async getRun(input: GetRunInput): Promise<GetRunResult> {
      const managed = this.findManagedRun(input.run_id);
      if (managed) {
        return toGetRunResult(managed.record);
      }
    
      const record = await this.storage.readRunRecordById(input.run_id);
      if (!record) {
        throw new Error(`Unknown run_id: ${input.run_id}`);
      }
      return toGetRunResult(record);
    }
  • Input schema definition for the get_run tool. Validates that run_id is a non-empty string.
    export const getRunSchema = z.object({
      run_id: z.string().min(1),
    });
  • Registration function that registers the get_run tool with the MCP server. Connects the tool name, schema, and handler together.
    export function registerGetRunTool(server: McpServer, manager: RunManager): void {
      server.registerTool(
        'get_run',
        {
          description: 'Get the current summary status for a known run.',
          inputSchema: getRunSchema,
          outputSchema: runSummarySchema,
        },
        async (args) => {
          try {
            const result = await manager.getRun(args);
            return asToolResult(result);
          } catch (error) {
            return asToolError(String(error));
          }
        },
      );
    }
  • TypeScript type definitions for the get_run tool input and output structures.
    export interface GetRunInput {
      run_id: string;
    }
    
    export interface GetRunResult {
      run_id: string;
      backend: BackendKind;
      role: RunRole;
      session_id: string;
      status: RunStatus;
      started_at: string;
      updated_at: string;
      summary: string;
      last_seq: number;
      cwd: string;
      metadata: Record<string, unknown>;
      remote_ref: RemoteRef | null;
    }
  • Helper function that transforms a RunRecord into a GetRunResult, mapping internal property names to the external API format.
    function toGetRunResult(record: RunRecord): GetRunResult {
      return {
        run_id: record.runId,
        backend: record.backend,
        role: record.role,
        session_id: record.sessionId,
        status: record.status,
        started_at: record.startedAt,
        updated_at: record.updatedAt,
        summary: record.summary,
        last_seq: record.lastSeq,
        cwd: record.cwd,
        metadata: record.metadata,
        remote_ref: record.remoteRef,
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves a 'summary status,' implying a read-only operation, but doesn't specify whether it's safe, if it requires authentication, rate limits, or what happens if the run_id is invalid. For a tool with no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero waste: 'Get the current summary status for a known run.' It is front-loaded and efficiently conveys the core purpose without unnecessary elaboration, making it highly concise and well-structured.

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

Completeness3/5

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

Given the tool's low complexity (1 parameter, no nested objects) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and incomplete parameter semantics, it lacks details on behavioral traits and usage context, making it only partially complete for effective agent use.

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 1 parameter (run_id) with 0% description coverage, meaning the schema provides no semantic details. The description adds minimal context by implying 'run_id' refers to 'a known run,' but doesn't explain format, examples, or constraints. This partially compensates for the schema gap, but not fully, aligning with the baseline for moderate coverage.

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 tool's purpose: 'Get the current summary status for a known run.' It specifies the verb ('Get'), resource ('summary status'), and scope ('for a known run'), which is specific and actionable. However, it doesn't explicitly differentiate from sibling tools like 'list_runs' or 'poll_events', which prevents a perfect score.

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 no guidance on when to use this tool versus alternatives. It mentions 'a known run' but doesn't clarify prerequisites (e.g., that the run must already exist from a previous operation) or contrast it with siblings like 'list_runs' (for listing runs) or 'poll_events' (for monitoring events). This leaves the agent without explicit usage context.

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/dufangshi/orchestration-mcp'

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