Skip to main content
Glama

publish_workflow

Publish, pause, or archive workflows in the Agentled MCP Server to control execution status and manage workflow lifecycle.

Instructions

Change the status of a workflow (publish, pause, or archive). Valid transitions: created/draft -> live, live -> paused, paused -> live, any -> archived. Use "live" to publish a draft workflow so it can be executed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesThe workflow ID
statusYesTarget status

Implementation Reference

  • The API client method that performs the network request to change the workflow status.
    async publishWorkflow(id: string, status: string) {
        return this.request(`/workflows/${id}/status`, {
            method: 'PATCH',
            body: JSON.stringify({ status }),
        });
    }
  • The MCP tool registration and handler implementation for "publish_workflow".
        server.tool(
            'publish_workflow',
            `Change the status of a workflow (publish, pause, or archive).
    Valid transitions: created/draft -> live, live -> paused, paused -> live, any -> archived.
    Use "live" to publish a draft workflow so it can be executed.`,
            {
                workflowId: z.string().describe('The workflow ID'),
                status: z.enum(['live', 'paused', 'archived']).describe('Target status'),
            },
            async ({ workflowId, status }, extra) => {
                const client = clientFactory(extra);
                const result = await client.publishWorkflow(workflowId, status);
                return {
                    content: [{
                        type: 'text' as const,
                        text: JSON.stringify(result, null, 2),
                    }],
                };
            }
        );

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/Agentled/mcp-server'

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