Skip to main content
Glama

retrieve_multiple_story_schedules

Retrieve multiple story schedules from a Storyblok space, with optional filtering by status (published_before_schedule or scheduled).

Instructions

Retrieves multiple story scheduling entries in a Storyblok space via the Management API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesNumeric ID of the Storyblok space
by_statusNoOptional status filter ("published_before_schedule" or "scheduled")

Implementation Reference

  • The handler function for retrieve_multiple_story_schedules. It accepts an optional 'by_status' filter, builds query params, calls apiGet to the Storyblok Management API endpoint '/story_schedulings/', and returns the JSON response.
    async ({ by_status }) => {
      try {
        const params: Record<string, string> = {};
        if (by_status !== undefined) {
          params.by_status = by_status;
        }
    
        const data = await apiGet('/story_schedulings/', params);
        return createJsonResponse(data);
      } catch (error) {
        if (error instanceof APIError) {
          return createErrorResponse(error);
        }
        throw error;
      }
    }
  • Zod schema for input validation. Defines 'space_id' (required number) and 'by_status' (optional string with values like 'published_before_schedule' or 'scheduled').
    {
      space_id: z.number().describe('Numeric ID of the Storyblok space'),
      by_status: z
        .string()
        .optional()
        .describe('Optional status filter ("published_before_schedule" or "scheduled")'),
    },
  • The tool is registered with the MCP server via server.tool() with the name 'retrieve_multiple_story_schedules', description, Zod schema, and handler function. The parent function registerSchedulingStories is called from src/tools/index.ts at line 78.
    server.tool(
      'retrieve_multiple_story_schedules',
      'Retrieves multiple story scheduling entries in a Storyblok space via the Management API.',
      {
        space_id: z.number().describe('Numeric ID of the Storyblok space'),
        by_status: z
          .string()
          .optional()
          .describe('Optional status filter ("published_before_schedule" or "scheduled")'),
      },
      async ({ by_status }) => {
        try {
          const params: Record<string, string> = {};
          if (by_status !== undefined) {
            params.by_status = by_status;
          }
    
          const data = await apiGet('/story_schedulings/', params);
          return createJsonResponse(data);
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
    );
  • Helper function apiGet used by the handler to make GET requests to the Storyblok Management API. It builds the full URL with query params, sets auth headers, and handles the response.
    export async function apiGet<T = unknown>(
      path: string,
      params: Record<string, string> = {}
    ): Promise<T> {
      const url = buildUrlWithParams(buildManagementUrl(path), params);
      const response = await fetch(url, {
        method: 'GET',
        headers: getManagementHeaders(),
      });
      return handleResponse<T>(response, url);
    }
  • Helper function createJsonResponse used by the handler to format the API response as a JSON string in the MCP text content format.
    export function createJsonResponse(data: unknown): McpSuccessResponse {
      return {
        content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states it is a 'retrieves' operation, implying read-only behavior, but does not disclose potential behavioral traits such as required permissions, rate limits, or what happens if no entries match the filter.

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

Conciseness5/5

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

The description is a single sentence of 12 words with no unnecessary information. It is front-loaded with the key action and resource.

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

Completeness4/5

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

Given the simplicity of the tool (2 parameters, no output schema, no nested objects), the description is mostly sufficient. However, it does not describe the return format or any pagination behavior, which could be useful for a retrieval of multiple items.

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?

The input schema has 100% description coverage, and the tool description adds no additional meaning beyond what is already in the schema. Baseline score of 3 is appropriate.

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 'Retrieves', the resource 'multiple story scheduling entries', and the context 'in a Storyblok space via the Management API'. It differentiates from the sibling tool 'retrieve_one_story_schedule' by indicating it retrieves multiple entries.

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

Usage Guidelines3/5

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

The description does not explicitly state when to use this tool versus alternatives like 'retrieve_one_story_schedule'. The implication is that it is used for retrieving multiple entries, but no exclusions or conditions are provided.

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