Skip to main content
Glama

create_story_schedule

Schedule a story for publication by setting its publish date and optional language using the Storyblok Management API.

Instructions

Creates a new story schedule via the Storyblok Management API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
story_idYesNumeric ID of the story to be scheduled
publish_atYesISO-8601 date/time string in UTC (e.g., "2025-06-20T15:30:00Z")
languageNoOptional language code (e.g., "en", "pt-br")

Implementation Reference

  • The handler function for the 'create_story_schedule' tool. It accepts story_id, publish_at, and optional language, builds a payload object, and POSTs it to '/story_schedulings' via apiPost, returning the JSON response.
    // Tool: create_story_schedule
    server.tool(
      'create_story_schedule',
      'Creates a new story schedule via the Storyblok Management API.',
      {
        story_id: z.number().describe('Numeric ID of the story to be scheduled'),
        publish_at: z
          .string()
          .describe('ISO-8601 date/time string in UTC (e.g., "2025-06-20T15:30:00Z")'),
        language: z.string().optional().describe('Optional language code (e.g., "en", "pt-br")'),
      },
      async ({ story_id, publish_at, language }) => {
        try {
          const storySchedulingData: Record<string, unknown> = {
            story_id,
            publish_at,
          };
          if (language !== undefined) {
            storySchedulingData.language = language;
          }
    
          const payload = { story_scheduling: storySchedulingData };
          const data = await apiPost('/story_schedulings', payload);
          return createJsonResponse(data);
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
    );
  • Input schema for 'create_story_schedule': story_id (number), publish_at (string, ISO-8601), and optional language (string).
    {
      story_id: z.number().describe('Numeric ID of the story to be scheduled'),
      publish_at: z
        .string()
        .describe('ISO-8601 date/time string in UTC (e.g., "2025-06-20T15:30:00Z")'),
      language: z.string().optional().describe('Optional language code (e.g., "en", "pt-br")'),
    },
  • Registration call: registerSchedulingStories(server) is invoked in registerAllTools, which registers all scheduling story tools including 'create_story_schedule'.
    registerReleases(server);
    registerSchedulingStories(server);
  • Import statement for registerSchedulingStories from scheduling-stories.ts.
    import { registerSchedulingStories } from './scheduling-stories.js';
    import { registerSpace } from './space.js';
    import { registerSpaceRoles } from './space-roles.js';
    import { registerTasks } from './tasks.js';
    import { registerWebhooks } from './webhooks.js';
    import { registerWorkflows } from './workflows.js';
    import { registerWorkflowStages } from './workflow-stage.js';
    import { registerWorkflowStageChanges } from './workflow-stage-changes.js';
  • The apiPost helper function used by the create_story_schedule handler to make the POST request 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?

No annotations are present, so the description must carry the full burden. It lacks disclosure of side effects (e.g., does it override existing schedules?), permissions required, or error conditions. Minimal behavioral context leaves the agent uncertain about what happens when the tool is invoked.

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

Conciseness3/5

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

The description is a single sentence, which is concise, but it includes the redundant phrase 'via the Storyblok Management API'. This phrase does not earn its place as it is likely obvious from context. The description could be shorter without loss of meaning.

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 annotations and output schema, the description is insufficient. It does not explain return values (e.g., schedule ID?), constraints (e.g., future publish date), or how it relates to sibling tools like retrieve_one_story_schedule. The tool needs more context for an agent to use it correctly.

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%, so the input schema already documents all parameters. The description adds no extra meaning beyond what the schema provides. Baseline of 3 is appropriate as no additional context is needed from description, but it could have clarified parameter relationships (e.g., language default).

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') and the resource ('story schedule'). It distinguishes from sibling tools like update_story_schedule and delete_story_schedule through the verb 'creates'. However, it does not explicitly differentiate from other 'create_' tools beyond the name.

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 is provided on when to use this tool vs alternatives such as update_story_schedule or delete_story_schedule. There is no mention of prerequisites (e.g., story must exist) or when not to use this tool.

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