@tpmjs/tools-workflow-explain
Explains what a workflow does in plain language. Takes a workflow object with name and steps, then generates a human-readable explanation with step summaries and complexity assessment. Useful for documentation and understanding existing workflows.
Workflow must have at least one step
Last checked: 1/1/2026, 8:18:09 AM
Test @tpmjs/tools-workflow-explain (workflowExplainTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-workflow-explainpnpm add @tpmjs/tools-workflow-explainyarn add @tpmjs/tools-workflow-explainbun add @tpmjs/tools-workflow-explaindeno add npm:@tpmjs/tools-workflow-explainimport { workflowExplainTool } from '@tpmjs/tools-workflow-explain';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { workflowExplainTool } from '@tpmjs/tools-workflow-explain';
const result = await generateText({
model: openai('gpt-4o'),
tools: { workflowExplainTool },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
workflowobjectThe workflow to explain
Schema extracted: 1/1/2026, 8:18:09 AM
Explains what a workflow does in plain language. Analyzes workflow steps and generates human-readable explanations with complexity assessments.
npm install @tpmjs/tools-workflow-explain
import { workflowExplainTool } from '@tpmjs/tools-workflow-explain'; const result = await workflowExplainTool.execute({ workflow: { name: 'User Onboarding', description: 'Onboards new users to the platform', steps: [ { tool: 'validateEmail', inputs: { email: 'string' }, outputs: { isValid: 'boolean' }, description: 'Validates user email address', }, { tool: 'createAccount', inputs: { email: 'string', password: 'string' }, outputs: { userId: 'string', accountId: 'string' }, }, { tool: 'sendWelcomeEmail', inputs: { userId: 'string', email: 'string' }, outputs: { sent: 'boolean' }, }, ], }, }); console.log(result); // { // explanation: 'This workflow "User Onboarding" onboards new users...', // stepSummaries: [ // { // stepNumber: 1, // tool: 'validateEmail', // action: 'Validates user email address', // inputSummary: 'using email', // outputSummary: 'producing isValid' // }, // ... // ], // complexity: 'simple', // metrics: { // totalSteps: 3, // uniqueTools: 3, // estimatedDuration: '< 1 minute', // hasConditionals: false, // hasLoops: false // } // }
{ workflow: { name: string; // Workflow name steps: Array<{ // Workflow steps tool: string; // Tool name inputs?: object; // Input parameters outputs?: object; // Output values description?: string; // Optional step description }>; description?: string; // Optional workflow description metadata?: object; // Optional metadata }; }
{ explanation: string; // Overall workflow explanation stepSummaries: Array<{ // Summary for each step stepNumber: number; tool: string; action: string; // What the step does inputSummary: string; // Human-readable input summary outputSummary: string; // Human-readable output summary }>; complexity: 'simple' | 'moderate' | 'complex' | 'very-complex'; metrics: { totalSteps: number; uniqueTools: number; estimatedDuration: string; hasConditionals: boolean; hasLoops: boolean; }; }
MIT
Downloads/month
47
Quality Score