* Get the canonical workflow for a tool based on its module path.
(tool: ToolManifestEntry)
| 151 | * Get the canonical workflow for a tool based on its module path. |
| 152 | */ |
| 153 | function getCanonicalWorkflow(tool: ToolManifestEntry): string | undefined { |
| 154 | const moduleParts = tool.module.split('/'); |
| 155 | if (moduleParts.length >= 3) { |
| 156 | return moduleParts[2]; // mcp/tools/<workflow>/<tool> |
| 157 | } |
| 158 | return undefined; |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * Register the 'tools' command for listing available tools. |