Skip to main content
Glama

create_workflow

Create a new workflow in your Storyblok space by specifying a name and content types it applies to.

Instructions

Creates a new workflow in a Storyblok space via the Management API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the workflow
content_typesYesList of content types this workflow applies to

Implementation Reference

  • The create_workflow tool handler. Defines the tool with name 'create_workflow', accepts 'name' (string) and 'content_types' (string array) as input, and POSTs to '/workflows' via the Storyblok Management API.
    // Tool: create_workflow
    server.tool(
      'create_workflow',
      'Creates a new workflow in a Storyblok space via the Management API.',
      {
        name: z.string().describe('Name of the workflow'),
        content_types: z.array(z.string()).describe('List of content types this workflow applies to'),
      },
      async ({ name, content_types }) => {
        try {
          const payload = {
            workflow: {
              name,
              content_types,
            },
          };
    
          const data = await apiPost('/workflows', payload);
          return createJsonResponse(data);
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
  • Input schema for create_workflow: requires 'name' (z.string()) and 'content_types' (z.array(z.string())).
    {
      name: z.string().describe('Name of the workflow'),
      content_types: z.array(z.string()).describe('List of content types this workflow applies to'),
  • Registration of registerWorkflows (which includes create_workflow) in the central tool aggregator.
    registerWorkflows(server);
    registerWorkflowStages(server);
    registerWorkflowStageChanges(server);
  • Import of registerWorkflows from './workflows.js' in the tool aggregator.
    import { registerWorkflows } from './workflows.js';
    import { registerWorkflowStages } from './workflow-stage.js';
    import { registerWorkflowStageChanges } from './workflow-stage-changes.js';
  • The apiPost helper used by create_workflow to POST the workflow payload to the Storyblok Management API.
    export async function apiPost<T = unknown>(
      path: string,
      body: unknown
    ): Promise<T> {
      const url = buildManagementUrl(path);
      const response = await fetch(url, {
        method: 'POST',
        headers: getManagementHeaders(),
        body: JSON.stringify(body),
      });
      return handleResponse<T>(response, url);
    }
Behavior2/5

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

With no annotations, the description bears full responsibility for behavioral disclosure. It only states 'Creates a new workflow' without detailing side effects, required permissions, or whether the operation is idempotent.

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

Conciseness4/5

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

The description is a single sentence with no wasted words. It is concise but could incorporate more detail without becoming verbose.

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

Completeness2/5

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

Given the lack of output schema and annotations, the description is minimal. It omits expected return values, prerequisites, and any additional context that would help the agent understand the tool's role.

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% with both parameters described. The description adds no additional meaning beyond the schema, so it meets the baseline of 3.

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 verb 'Creates' and the resource 'new workflow' with context 'in a Storyblok space via the Management API'. It effectively distinguishes this tool from siblings that create other resources like stories or tags.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives such as 'create_workflow_stage'. There is no mention of prerequisites or scenarios where this tool is appropriate.

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