Skip to main content
Glama

create_release

Create a new release in a Storyblok space with optional scheduling, branch deployment, and user notifications.

Instructions

Creates a new release in a specified Storyblok space.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the release
release_atNoScheduled release date/time (ISO 8601)
timezoneNoTimezone for the release
branches_to_deployNoBranch IDs to deploy to
users_to_notify_idsNoUser IDs to notify

Implementation Reference

  • The handler for the create_release tool. It constructs a release payload with optional fields (release_at, timezone, branches_to_deploy, users_to_notify_ids), wraps it in { release: ... }, and POSTs to /releases via apiPost(). Returns the JSON response or an APIError.
    // Tool: create_release
    server.tool(
      'create_release',
      'Creates a new release in a specified Storyblok space.',
      {
        name: z.string().describe('Name of the release'),
        release_at: z.string().optional().describe('Scheduled release date/time (ISO 8601)'),
        timezone: z.string().optional().describe('Timezone for the release'),
        branches_to_deploy: z.array(z.number()).optional().describe('Branch IDs to deploy to'),
        users_to_notify_ids: z.array(z.number()).optional().describe('User IDs to notify'),
      },
      async ({ name, release_at, timezone, branches_to_deploy, users_to_notify_ids }) => {
        try {
          const releaseData: Record<string, unknown> = { name };
          if (release_at !== undefined) releaseData.release_at = release_at;
          if (timezone !== undefined) releaseData.timezone = timezone;
          if (branches_to_deploy !== undefined) releaseData.branches_to_deploy = branches_to_deploy;
          if (users_to_notify_ids !== undefined) releaseData.users_to_notify_ids = users_to_notify_ids;
    
          const payload = { release: releaseData };
          const data = await apiPost('/releases', payload);
          return createJsonResponse(data);
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
    );
  • Zod schema for create_release input: name (string, required), release_at (string, optional), timezone (string, optional), branches_to_deploy (array of numbers, optional), users_to_notify_ids (array of numbers, optional).
    {
      name: z.string().describe('Name of the release'),
      release_at: z.string().optional().describe('Scheduled release date/time (ISO 8601)'),
      timezone: z.string().optional().describe('Timezone for the release'),
      branches_to_deploy: z.array(z.number()).optional().describe('Branch IDs to deploy to'),
      users_to_notify_ids: z.array(z.number()).optional().describe('User IDs to notify'),
    },
  • Registration call: registerReleases(server) invoked from the tool aggregator, which registers all release tools including create_release on the MCP server.
    registerReleases(server);
  • The registerReleases function exported from releases.ts. It calls server.tool('create_release', ...) to register the tool on the MCP server.
    export function registerReleases(server: McpServer): void {
      // Tool: retrieve_multiple_releases
      server.tool(
        'retrieve_multiple_releases',
        'Retrieves multiple releases from a specified Storyblok space.',
        {
          space_id: z.number().describe('Space ID'),
          branch_id: z.number().optional().describe('Filter by branch ID'),
        },
        async ({ branch_id }) => {
          try {
            const params: Record<string, string> = {};
            if (branch_id !== undefined) params.branch_id = String(branch_id);
    
            const data = await apiGet('/releases', params);
            return createJsonResponse(data);
          } catch (error) {
            if (error instanceof APIError) {
              return createErrorResponse(error);
            }
            throw error;
          }
        }
      );
    
      // Tool: retrieve_single_release
      server.tool(
        'retrieve_single_release',
        'Retrieves a single release from a specified Storyblok space.',
        {
          release_id: z.number().describe('ID of the release to retrieve'),
        },
        async ({ release_id }) => {
          try {
            const data = await apiGet(`/releases/${release_id}`);
            return createJsonResponse(data);
          } catch (error) {
            if (error instanceof APIError) {
              return createErrorResponse(error);
            }
            throw error;
          }
        }
      );
    
      // Tool: create_release
      server.tool(
        'create_release',
        'Creates a new release in a specified Storyblok space.',
        {
          name: z.string().describe('Name of the release'),
          release_at: z.string().optional().describe('Scheduled release date/time (ISO 8601)'),
          timezone: z.string().optional().describe('Timezone for the release'),
          branches_to_deploy: z.array(z.number()).optional().describe('Branch IDs to deploy to'),
          users_to_notify_ids: z.array(z.number()).optional().describe('User IDs to notify'),
        },
        async ({ name, release_at, timezone, branches_to_deploy, users_to_notify_ids }) => {
          try {
            const releaseData: Record<string, unknown> = { name };
            if (release_at !== undefined) releaseData.release_at = release_at;
            if (timezone !== undefined) releaseData.timezone = timezone;
            if (branches_to_deploy !== undefined) releaseData.branches_to_deploy = branches_to_deploy;
            if (users_to_notify_ids !== undefined) releaseData.users_to_notify_ids = users_to_notify_ids;
    
            const payload = { release: releaseData };
            const data = await apiPost('/releases', payload);
            return createJsonResponse(data);
          } catch (error) {
            if (error instanceof APIError) {
              return createErrorResponse(error);
            }
            throw error;
          }
        }
      );
    
      // Tool: update_release
      server.tool(
        'update_release',
        'Updates an existing release in a specified Storyblok space.',
        {
          release_id: z.number().describe('ID of the release to update'),
          name: z.string().optional().describe('New name for the release'),
          release_at: z.string().optional().describe('New scheduled release date/time'),
          timezone: z.string().optional().describe('New timezone'),
          branches_to_deploy: z.array(z.number()).optional().describe('New branch IDs to deploy to'),
          users_to_notify_ids: z.array(z.number()).optional().describe('New user IDs to notify'),
          do_release: z.boolean().optional().describe('Whether to trigger the release'),
        },
        async ({ release_id, name, release_at, timezone, branches_to_deploy, users_to_notify_ids, do_release }) => {
          try {
            const releaseData: Record<string, unknown> = {};
            if (name !== undefined) releaseData.name = name;
            if (release_at !== undefined) releaseData.release_at = release_at;
            if (timezone !== undefined) releaseData.timezone = timezone;
            if (branches_to_deploy !== undefined) releaseData.branches_to_deploy = branches_to_deploy;
            if (users_to_notify_ids !== undefined) releaseData.users_to_notify_ids = users_to_notify_ids;
    
            const payload: Record<string, unknown> = { release: releaseData };
            if (do_release !== undefined) payload.do_release = do_release;
    
            const data = await apiPut(`/releases/${release_id}`, payload);
            return createJsonResponse(data);
          } catch (error) {
            if (error instanceof APIError) {
              return createErrorResponse(error);
            }
            throw error;
          }
        }
      );
    
      // Tool: delete_release
      server.tool(
        'delete_release',
        'Deletes a release.',
        {
          release_id: z.string().describe('ID of the release to delete'),
        },
        async ({ release_id }) => {
          try {
            await apiDelete(`/releases/${release_id}`);
            return {
              content: [
                { type: 'text' as const, text: `Release ${release_id} has been successfully deleted.` },
              ],
            };
          } catch (error) {
            if (error instanceof APIError) {
              return createErrorResponse(error);
            }
            throw error;
          }
        }
      );
    }
  • The apiPost helper used by the 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 provided, and the description does not disclose behavioral traits like idempotency, side effects, or required permissions. Asserts creation without any additional context.

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, efficient sentence. However, it is too concise and omits important context, scoring appropriately for a minimal but not wasteful text.

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?

With 5 parameters, no output schema, and no annotations, the description should provide more context about required fields, behavior, and return values. It fails to do so.

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 description coverage is 100%, so baseline is 3. The description adds no meaning beyond the schema; it does not explain the role of parameters like 'release_at' or 'branches_to_deploy'.

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 ('Creates') and the resource ('new release') within a specific context ('Storyblok space'). It distinguishes from sibling tools like 'update_release' and 'delete_release'.

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 such as 'update_release' or 'create_branch'. The description does not mention prerequisites or context for use.

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