Skip to main content
Glama

delete_workflow

Delete a workflow in Storyblok by its ID using the Management API. The default workflow is protected and cannot be removed.

Instructions

Deletes a workflow by its ID in a Storyblok space via the Management API. The default workflow cannot be deleted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflow_idYesID of the workflow to delete

Implementation Reference

  • Handler function that deletes a workflow by ID via the Storyblok Management API. Uses apiDelete internally and returns a success message string (not JSON).
    // Tool: delete_workflow
    server.tool(
      'delete_workflow',
      'Deletes a workflow by its ID in a Storyblok space via the Management API. The default workflow cannot be deleted.',
      {
        workflow_id: z.number().describe('ID of the workflow to delete'),
      },
      async ({ workflow_id }) => {
        try {
          await apiDelete(`/workflows/${workflow_id}`);
          return {
            content: [
              { type: 'text' as const, text: `Workflow ${workflow_id} has been successfully deleted.` },
            ],
          };
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
    );
  • Input schema requiring workflow_id as a number.
    {
      workflow_id: z.number().describe('ID of the workflow to delete'),
    },
  • Registration function that registers all workflow tools, including delete_workflow, with the MCP server.
    export function registerWorkflows(server: McpServer): void {
  • Top-level registration call that triggers registration of all workflow tools including delete_workflow.
    registerWorkflows(server);
  • Helper function that performs the HTTP DELETE request to the Storyblok Management API.
    export async function apiDelete<T = unknown>(path: string): Promise<T> {
      const url = buildManagementUrl(path);
      const response = await fetch(url, {
        method: 'DELETE',
        headers: getManagementHeaders(),
      });
      return handleResponse<T>(response, url);
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses that the default workflow cannot be deleted, which is a critical behavioral trait. However, it does not mention whether deletion is irreversible, requires specific permissions, or impacts related data (e.g., workflow stages).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: two short sentences with no redundancy. Every sentence adds value, especially the constraint on the default workflow. It is front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema) and the presence of many sibling delete tools, the description adequately covers the essential behavior and constraint. It could mention that the deletion is permanent or require specific permissions, but it is largely complete for an experienced user.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds little beyond the schema: it repeats 'by its ID' which matches the schema's property description. No additional meaning or usage hints are provided for the parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (deletes), the resource (workflow by ID), and the context (Storyblok space via Management API). It also includes a key constraint (default workflow cannot be deleted), which distinguishes it from sibling delete tools like delete_workflow_stage.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool (to delete a non-default workflow) but does not explicitly state when not to use it or mention alternatives like update_workflow. The constraint about the default workflow provides some guidance, but it lacks explicit exclusions or comparisons to siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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