Skip to main content
Glama

create_approval

Create an approval request for a content entry by providing the story's numeric ID and the approver's numeric ID.

Instructions

Creates an approval request for a story in a Storyblok space.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
story_idYesNumeric ID of the content entry to be approved
approver_idYesNumeric ID of the user who will approve it

Implementation Reference

  • The create_approval tool handler. Uses Zod schema for input validation (story_id and approver_id), sends a POST request to Storyblok's /approvals/ endpoint with the approval payload, and returns the JSON response or an error.
    // Tool: create_approval
    server.tool(
      'create_approval',
      'Creates an approval request for a story in a Storyblok space.',
      {
        story_id: z.number().describe('Numeric ID of the content entry to be approved'),
        approver_id: z.number().describe('Numeric ID of the user who will approve it'),
      },
      async ({ story_id, approver_id }) => {
        try {
          const payload = {
            approval: {
              story_id,
              approver_id,
            },
          };
          const data = await apiPost('/approvals/', payload);
          return createJsonResponse(data);
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
    );
  • Zod input schema for create_approval, requiring story_id (number) and approver_id (number).
    {
      story_id: z.number().describe('Numeric ID of the content entry to be approved'),
      approver_id: z.number().describe('Numeric ID of the user who will approve it'),
    },
  • Registration of the approvals module (including create_approval) in the central tool aggregator.
    registerApprovals(server);
  • The registerApprovals function that registers all approval tools including create_approval with the MCP server.
    export function registerApprovals(server: McpServer): void {
  • The apiPost helper utility used by create_approval to send POST requests 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 fails to disclose behavioral traits like idempotency, notification triggers, permissions required, or what happens if an approval already exists. This is a significant gap for a mutation tool.

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?

A single sentence that is front-loaded with the core action. However, it is slightly too concise for the lack of behavioral detail, but still efficient.

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 no annotations or output schema, the description should provide more context about the approval process, side effects, and response. It is too minimal for a tool with two required parameters.

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 description adds no extra meaning beyond what is already documented in the input schema. The brief description does not provide any additional context for the parameters.

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 tool creates an approval request for a story in Storyblok, with a specific verb and resource. It distinguishes from related siblings like create_release_approval by focusing on story-level approvals.

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_release_approval or create_workflow_stage. No prerequisites or context on when approval requests are 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