Skip to main content
Glama

list_by_category

Filter and list all API endpoints by a specific functional category in the Opentrons MCP Server, enabling organized access to robot control, protocol management, and health monitoring.

Instructions

List all endpoints in a specific functional category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesAPI category/tag to filter by

Implementation Reference

  • The main handler function for the 'list_by_category' tool. Filters the pre-loaded endpoints array by tags matching the input category (case-insensitive), groups results by exact tag matches, formats as Markdown, and returns structured content or available categories if no matches.
    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 } ] }; }
  • Input schema definition for the tool, specifying an object with required 'category' string property and predefined enum values for Opentrons API categories.
    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:81-101 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining name, description, and inputSchema for discovery.
    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)
    Handler dispatch registration in the CallToolRequestSchema switch statement, mapping tool name to listByCategory method call.
    case "list_by_category": return this.listByCategory(args);

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