Skip to main content
Glama

get_runs

Retrieve a list of all protocol runs on Opentrons robots to monitor execution history and manage automated laboratory workflows.

Instructions

List all runs on the robot

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
robot_ipYesRobot IP address

Implementation Reference

  • The main handler function for the 'get_runs' tool. Fetches the list of protocol runs from the Opentrons robot API at /runs, formats them nicely, and returns up to 10 recent runs with status, creation time, protocol ID, and duration.
    async getRuns(args) {
      const { robot_ip } = args;
      
      try {
        const data = await this.makeApiRequest(
          'GET',
          `http://${robot_ip}:31950/runs`
        );
        
        const runs = data.data || [];
        
        if (runs.length === 0) {
          return {
            content: [
              {
                type: "text",
                text: `No runs found on robot.`
              }
            ]
          };
        }
        
        const runList = runs.slice(0, 10).map(r => {
          const duration = r.completedAt && r.startedAt
            ? Math.round((new Date(r.completedAt) - new Date(r.startedAt)) / 1000 / 60)
            : null;
            
          return `**Run ${r.id}**\n` +
                 `  Status: ${r.status}\n` +
                 `  Created: ${new Date(r.createdAt).toLocaleString()}\n` +
                 `  Protocol: ${r.protocolId || 'None'}\n` +
                 `  Duration: ${duration ? `${duration} minutes` : 'N/A'}\n`;
        }).join('\n');
        
        return {
          content: [
            {
              type: "text",
              text: `Found ${runs.length} run${runs.length !== 1 ? 's' : ''} on robot${runs.length > 10 ? ' (showing latest 10)' : ''}:\n\n${runList}`
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `❌ Failed to get runs: ${error.message}`
            }
          ]
        };
      }
    }
  • Input schema definition for the get_runs tool. Requires 'robot_ip' parameter.
    inputSchema: {
      type: "object",
      properties: {
        robot_ip: { type: "string", description: "Robot IP address" }
      },
      required: ["robot_ip"]
    }
  • index.js:164-174 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining name, description, and input schema for get_runs.
    {
      name: "get_runs",
      description: "List all runs on the robot",
      inputSchema: {
        type: "object",
        properties: {
          robot_ip: { type: "string", description: "Robot IP address" }
        },
        required: ["robot_ip"]
      }
    },
  • index.js:258-259 (registration)
    Registration and dispatch of get_runs handler in the CallToolRequestSchema switch statement.
    case "get_runs":
      return this.getRuns(args);
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 it 'List all runs' but doesn't describe what a 'run' entails, whether this is a read-only operation, if it requires specific permissions, or how results are returned (e.g., pagination, format). 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, efficient sentence ('List all runs on the robot') that is front-loaded with the core purpose. There is zero waste or redundancy, making it appropriately sized and structured for clarity.

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 (one parameter, no output schema, no annotations), the description is minimally adequate but incomplete. It covers the basic purpose but lacks details on behavioral traits, usage context, or output format, which are needed for full understanding in the absence of annotations and output schema.

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 single parameter 'robot_ip' clearly documented as 'Robot IP address'. The description doesn't add any meaning beyond this, such as explaining why the IP is needed or format examples. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

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 ('List all runs') and the resource ('on the robot'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from sibling tools like 'get_run_status' or 'control_run', which also involve runs, so it doesn't fully differentiate from alternatives.

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 like 'get_run_status' (for status of a specific run) or 'create_run' (to start a new run). It lacks explicit when/when-not instructions or named alternatives, leaving usage context implied at best.

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/yerbymatey/opentrons-mcp'

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