( workflowName: string, workflowDescription: string | undefined | null, inputFormat: InputFormatField[], customToolName?: string, customDescription?: string )
| 285 | * Generate a complete MCP tool definition from workflow metadata and input format. |
| 286 | */ |
| 287 | export function generateToolDefinition( |
| 288 | workflowName: string, |
| 289 | workflowDescription: string | undefined | null, |
| 290 | inputFormat: InputFormatField[], |
| 291 | customToolName?: string, |
| 292 | customDescription?: string |
| 293 | ): McpToolDefinition { |
| 294 | return { |
| 295 | name: customToolName || sanitizeToolName(workflowName), |
| 296 | description: customDescription || workflowDescription || `Execute ${workflowName} workflow`, |
| 297 | inputSchema: generateToolInputSchema(inputFormat), |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | /** |
| 302 | * Extract input format from a workflow's blocks. |
nothing calls this directly
no test coverage detected