Skip to main content
Glama

delete_workflow

Remove a workflow while keeping recovery options available. Use this tool to temporarily disable or archive workflow processes in the workflows-mcp system.

Instructions

Soft delete a workflow (can be recovered)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • Handler function that executes the delete_workflow tool: parses input, calls storage.delete(id), handles errors, returns success message with workflow_id.
    private async deleteWorkflow(args: unknown) {
      const parsed = DeleteWorkflowSchema.parse(args);
      
      const success = await this.storage.delete(parsed.id);
      if (!success) {
        throw new Error(`Workflow not found: ${parsed.id}`);
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              workflow_id: parsed.id,
              message: 'Workflow deleted successfully (soft delete)',
            }, null, 2),
          },
        ],
      };
    }
  • Zod schema defining input for delete_workflow: requires 'id' string.
    const DeleteWorkflowSchema = z.object({
      id: z.string(),
    });
  • src/index.ts:272-276 (registration)
    Tool registration in getTools() method: defines name, description, and inputSchema for delete_workflow.
    {
      name: 'delete_workflow',
      description: 'Soft delete a workflow (can be recovered)',
      inputSchema: zodToJsonSchema(DeleteWorkflowSchema),
    },
  • src/index.ts:130-131 (registration)
    Dispatch registration in CallToolRequestSchema handler switch statement: routes 'delete_workflow' calls to deleteWorkflow method.
    case 'delete_workflow':
      return await this.deleteWorkflow(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/FiveOhhWon/workflows-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server