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);

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