Skip to main content
Glama

continue_run

Provide additional input to a paused run that requires more information to proceed, enabling continued execution of orchestrated coding tasks.

Instructions

Send an additional input message to a run that is waiting for more input.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYes
input_messageYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYes
statusYes

Implementation Reference

  • The continueRun method in RunManager contains the core handler logic for the continue_run tool. It validates the run state, checks if the run is active and awaiting input, creates a resume event, and invokes the adapter's continue method to send additional input to a waiting run.
    async continueRun(input: ContinueRunInput): Promise<ContinueRunResult> {
      const managed = this.findManagedRun(input.run_id);
      if (!managed) {
        throw new Error(`run is not active in this process: ${input.run_id}`);
      }
      if (isTerminalStatus(managed.record.status)) {
        throw new Error(`run is already terminal: ${managed.record.status}`);
      }
      if (managed.record.status !== 'input_required' && managed.record.status !== 'auth_required') {
        throw new Error(`run is not awaiting additional input: ${managed.record.status}`);
      }
      const continueFn = managed.adapter.continue ?? managed.handle.continue;
      if (!continueFn) {
        throw new Error(`backend does not support continue: ${managed.record.backend}`);
      }
    
      const resumedAt = new Date().toISOString();
      const resumeEvent = this.prepareEvent(managed, {
        seq: 0,
        ts: resumedAt,
        run_id: '',
        session_id: managed.record.sessionId,
        backend: managed.record.backend,
        type: 'status_changed',
        data: {
          status: 'running',
          reason: 'continue_run',
        },
      });
      await this.persistEvent(managed, resumeEvent);
    
      if (managed.adapter.continue) {
        await managed.adapter.continue(managed.handle, input.input_message);
      } else {
        await managed.handle.continue?.(input.input_message);
      }
    
      return {
        run_id: managed.record.runId,
        status: managed.record.status,
      };
    }
  • The registerContinueRunTool function registers the 'continue_run' tool with the MCP server, defining its name, description, input/output schemas, and the async handler that wraps the RunManager.continueRun method with error handling.
    export function registerContinueRunTool(server: McpServer, manager: RunManager): void {
      server.registerTool(
        'continue_run',
        {
          description: 'Send an additional input message to a run that is waiting for more input.',
          inputSchema: continueRunSchema,
          outputSchema: continueRunResultSchema,
        },
        async (args) => {
          try {
            const result = await manager.continueRun(args);
            return asToolResult(result);
          } catch (error) {
            return asToolError(String(error));
          }
        },
      );
    }
  • The continueRunSchema defines the input validation schema using Zod, requiring a run_id string and an input_message that conforms to agentMessageSchema.
    export const continueRunSchema = z.object({
      run_id: z.string().min(1),
      input_message: agentMessageSchema,
    });
  • The continueRunResultSchema defines the output validation schema, containing run_id and status fields.
    export const continueRunResultSchema = z.object({
      run_id: z.string(),
      status: runStatusSchema,
    });
  • TypeScript interface definitions for ContinueRunInput (run_id and input_message) and ContinueRunResult (run_id and status) used by the continue_run tool.
    export interface ContinueRunInput {
      run_id: string;
      input_message: AgentMessage;
    }
    
    export interface ContinueRunResult {
      run_id: string;
      status: RunStatus;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it correctly indicates a write operation ('send'), it lacks critical details: required permissions, whether this changes run state, rate limits, error conditions, or what happens after sending input. For a mutation tool with complex nested parameters, this leaves significant behavioral gaps.

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, efficient sentence that front-loads the core purpose without unnecessary words. Every word earns its place, making it maximally concise while still conveying the essential action and context.

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 moderate complexity (2 parameters with nested objects), no annotations, but presence of an output schema, the description is minimally adequate. The output schema reduces need to describe return values, but the description should provide more context about run states, prerequisites, and parameter meanings to be truly complete for this interactive operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate but provides no parameter information. It doesn't explain what 'run_id' refers to, the structure of 'input_message', valid roles, or part types. With 2 parameters including complex nested objects, the description fails to add any semantic value beyond what the bare schema provides.

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 action ('send an additional input message') and target ('to a run that is waiting for more input'), providing specific verb+resource. However, it doesn't explicitly differentiate from sibling tools like 'spawn_run' or 'cancel_run', which would require mentioning it's for existing runs in a waiting state rather than creating new runs or terminating them.

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

Usage Guidelines3/5

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

The description implies usage context by specifying 'to a run that is waiting for more input', suggesting this tool should be used when a run is in a specific state. However, it doesn't provide explicit when-not-to-use guidance or name alternatives like 'spawn_run' for new runs or 'cancel_run' for termination, leaving some ambiguity about sibling tool selection.

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