Skip to main content
Glama

list_by_category

Filter and display API endpoints by functional category to organize Opentrons robot control operations.

Instructions

List all endpoints in a specific functional category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesAPI category/tag to filter by

Implementation Reference

  • The handler function for the 'list_by_category' tool. It filters the endpoints array by tags matching the provided category (case-insensitive), groups results by exact tag, and returns a formatted markdown list of matching endpoints.
    listByCategory(args) {
      const { category } = args;
    
      const filtered = this.endpoints.filter(endpoint =>
        endpoint.tags.some(tag => tag.toLowerCase().includes(category.toLowerCase()))
      );
    
      if (filtered.length === 0) {
        const availableCategories = [...new Set(this.endpoints.flatMap(e => e.tags))];
        return {
          content: [
            {
              type: "text",
              text: `No endpoints found for category "${category}".\n\nAvailable categories:\n${availableCategories.map(cat => `- ${cat}`).join('\n')}`
            }
          ]
        };
      }
    
      // Group by exact tag match
      const groupedByTag = {};
      filtered.forEach(endpoint => {
        endpoint.tags.forEach(tag => {
          if (tag.toLowerCase().includes(category.toLowerCase())) {
            if (!groupedByTag[tag]) groupedByTag[tag] = [];
            groupedByTag[tag].push(endpoint);
          }
        });
      });
    
      let content = `**${category} API Endpoints** (${filtered.length} found):\n\n`;
    
      Object.entries(groupedByTag).forEach(([tag, endpoints]) => {
        content += `## ${tag}\n\n`;
        endpoints.forEach(endpoint => {
          content += `• **${endpoint.method} ${endpoint.path}** ${endpoint.deprecated ? '⚠️ DEPRECATED' : ''}\n`;
          content += `  ${endpoint.summary}\n\n`;
        });
      });
    
      return {
        content: [
          {
            type: "text",
            text: content
          }
        ]
      };
    }
  • The tool schema definition including name, description, and inputSchema with required 'category' parameter and list of valid categories.
      name: "list_by_category",
      description: "List all endpoints in a specific functional category",
      inputSchema: {
        type: "object",
        properties: {
          category: {
            type: "string",
            description: "API category/tag to filter by",
            enum: [
              "Health", "Networking", "Control", "Settings", "Modules",
              "Pipettes", "Calibration", "Run Management", "Protocol Management",
              "Data files Management", "Simple Commands", "Flex Deck Configuration",
              "Error Recovery Settings", "Attached Modules", "Attached Instruments",
              "Labware Offset Management", "System Control", "Client Data",
              "Maintenance Run Management", "Robot", "Subsystem Management"
            ]
          }
        },
        required: ["category"]
      }
    },
  • index.js:246-247 (registration)
    Registration of the tool handler in the CallToolRequestSchema switch statement, dispatching calls to the listByCategory method.
    case "list_by_category":
      return this.listByCategory(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 the tool lists endpoints but doesn't describe what 'list' entails (e.g., pagination, format, sorting, or error handling). For a tool with zero annotation coverage, this is a significant gap in transparency about its behavior and limitations.

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 directly states the tool's purpose without unnecessary words. It is front-loaded and every part of the sentence contributes to understanding the tool's function, 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.

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, data structure) or address potential behavioral aspects like error cases or performance. For a tool with no structured data beyond the input schema, more context is needed to fully understand its operation.

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 a clear enum for the 'category' parameter. The description adds no additional meaning beyond what the schema provides, such as explaining the purpose of categories or how they relate to endpoints. With high schema coverage, the baseline score of 3 is appropriate.

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 endpoints') and the resource ('in a specific functional category'), providing a specific verb+resource combination. However, it doesn't explicitly distinguish this tool from sibling tools like 'search_endpoints' or 'get_api_overview', which might offer similar or overlapping functionality.

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 'search_endpoints' or 'get_api_overview'. It lacks context about prerequisites, exclusions, or specific scenarios where this tool is preferred, leaving the agent to infer usage based solely on the tool name and description.

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