get_workflow_inputs
Retrieve necessary input parameters for a specific workflow using the workflow ID to streamline workflow execution.
Instructions
Get the required inputs for a workflow
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflow_id | Yes | ID of the workflow |
Implementation Reference
- src/index.ts:410-436 (handler)The handler function that checks authentication, makes an API GET request to fetch the inputs for the specified workflow, and returns the JSON response or an error message.private async handleGetWorkflowInputs(args: any) { if (!this.config.token) { throw new McpError(ErrorCode.InvalidRequest, 'Not logged in'); } try { const response = await this.axiosInstance.get(`/api/workflows/api-client/${args.workflow_id}/inputs`); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Failed to get workflow inputs: ${error.response?.data?.message || error.message}`, }, ], isError: true, }; } }
- src/index.ts:182-191 (schema)Defines the input schema for the tool, requiring a 'workflow_id' string parameter.inputSchema: { type: 'object', properties: { workflow_id: { type: 'string', description: 'ID of the workflow', }, }, required: ['workflow_id'], },
- src/index.ts:179-192 (registration)Registers the tool in the MCP server's tools list with name, description, and input schema.{ name: 'get_workflow_inputs', description: 'Get the required inputs for a workflow', inputSchema: { type: 'object', properties: { workflow_id: { type: 'string', description: 'ID of the workflow', }, }, required: ['workflow_id'], }, },
- src/index.ts:227-228 (registration)Dispatches the tool call to the specific handler function in the request handler switch statement.case 'get_workflow_inputs': return await this.handleGetWorkflowInputs(request.params.arguments);