Skip to main content
Glama

create_task

Creates a new task in your Storyblok space, specifying name, type, webhook URL, or lambda code. Manage content workflows by adding tasks directly via the API.

Instructions

Creates a new task in a specified Storyblok space using the Management API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the task
task_typeNoType of taskwebhook
webhook_urlNoWebhook URL for the task
descriptionNoDescription of the task
lambda_codeNoLambda code for the task
user_dialogNoUser dialog configuration

Implementation Reference

  • The handler function that executes the 'create_task' tool logic. It accepts task input fields (name, task_type, webhook_url, description, lambda_code, user_dialog), constructs a payload, and calls the Storyblok Management API POST /tasks/ endpoint.
    // Tool: create_task
    server.tool(
      'create_task',
      'Creates a new task in a specified Storyblok space using the Management API.',
      {
        name: z.string().describe('Name of the task'),
        task_type: z.string().optional().default('webhook').describe('Type of task'),
        webhook_url: z.string().optional().describe('Webhook URL for the task'),
        description: z.string().optional().describe('Description of the task'),
        lambda_code: z.string().optional().describe('Lambda code for the task'),
        user_dialog: z.record(z.unknown()).optional().describe('User dialog configuration'),
      },
      async ({ name, task_type, webhook_url, description, lambda_code, user_dialog }) => {
        try {
          const taskData: Record<string, unknown> = {
            name,
            task_type,
            webhook_url,
            description,
            lambda_code,
            user_dialog,
          };
    
          const payload = { task: taskData };
          const data = await apiPost('/tasks/', payload);
          return createJsonResponse(data);
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
    );
  • Zod schema definitions for 'create_task' input parameters: name (required string), task_type (optional string, default 'webhook'), webhook_url (optional string), description (optional string), lambda_code (optional string), user_dialog (optional record).
    {
      name: z.string().describe('Name of the task'),
      task_type: z.string().optional().default('webhook').describe('Type of task'),
      webhook_url: z.string().optional().describe('Webhook URL for the task'),
      description: z.string().optional().describe('Description of the task'),
      lambda_code: z.string().optional().describe('Lambda code for the task'),
      user_dialog: z.record(z.unknown()).optional().describe('User dialog configuration'),
    },
  • Registration of 'create_task' tool via server.tool() on the MCP server, with the name 'create_task' and description 'Creates a new task in a specified Storyblok space using the Management API.'
    server.tool(
      'create_task',
  • The 'create_task' tool is registered as part of the tasks module via registerTasks(server) called in the main tool aggregator.
    registerTasks(server);
  • The Task interface type definition used as the underlying data model for tasks, including id, name, description, task_type, webhook_url, lambda_code, and user_dialog fields.
    export interface Task {
      id: number;
      name: string;
      description: string | null;
      task_type: string;
      webhook_url: string | null;
      lambda_code: string | null;
      user_dialog: Record<string, unknown> | null;
    }
Behavior2/5

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

With no annotations, the description carries full burden. It only states 'creates' (mutation) but omits side effects, authorization needs, rate limits, idempotency, or return behavior.

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?

Single concise sentence, front-loaded, no filler. However, it may be too terse for a tool with 6 parameters.

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?

For a creation tool with 6 parameters and no output schema, the description lacks detail on parameter interdependencies (e.g., webhook_url vs lambda_code), how to specify the space, and return value. Incomplete.

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 parameter descriptions. The description adds no extra meaning beyond schema, which already provides names and types, so baseline 3.

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

Purpose4/5

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

The description clearly states the action (creates a task) and context (Storyblok space via Management API), but it doesn't differentiate from numerous sibling create_* tools like create_story or create_tag.

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 vs alternatives (e.g., create_story, create_internal_tag). Lacks context about prerequisites, allowed task types, or when not to use it.

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