Skip to main content
Glama

retrieve_single_task

Retrieve a specific task from your Storyblok space by its ID. Use this to fetch task details for review or status updates.

Instructions

Retrieves a single task from a specified Storyblok space using the Management API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesID of the task to retrieve

Implementation Reference

  • Handler for retrieve_single_task: takes task_id, makes GET request to /tasks/{task_id}, returns JSON response or error.
    async ({ task_id }) => {
      try {
        const data = await apiGet(`/tasks/${task_id}`);
        return createJsonResponse(data);
      } catch (error) {
        if (error instanceof APIError) {
          return createErrorResponse(error);
        }
        throw error;
      }
    }
  • Registration of retrieve_single_task via server.tool() with description, Zod schema for task_id, and handler.
    // Tool: retrieve_single_task
    server.tool(
      'retrieve_single_task',
      'Retrieves a single task from a specified Storyblok space using the Management API.',
      {
        task_id: z.number().describe('ID of the task to retrieve'),
      },
      async ({ task_id }) => {
        try {
          const data = await apiGet(`/tasks/${task_id}`);
          return createJsonResponse(data);
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
    );
  • Input schema: task_id (number) required.
    {
      task_id: z.number().describe('ID of the task to retrieve'),
    },
  • apiGet helper: builds the management API URL, performs GET fetch with auth headers, handles 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);
    }
  • createJsonResponse helper: serializes data as pretty-printed JSON for MCP response.
    export function createJsonResponse(data: unknown): McpSuccessResponse {
      return {
        content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
      };
    }
Behavior4/5

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

No annotations provided, but verb 'retrieves' indicates read-only operation. Description does not mention authentication, rate limits, or other behaviors, but for a simple retrieval this is sufficient.

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?

Single, clear sentence with no unnecessary words. Perfectly concise.

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

Completeness5/5

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

For a simple retrieval tool with one parameter and no output schema, the description is complete. No missing context.

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 parameter is already documented. Description adds 'from a specified Storyblok space' but does not add new meaning beyond schema.

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?

Description clearly states it retrieves a single task, using a specific verb and resource. It distinguishes from sibling tools like retrieve_multiple_tasks.

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?

No guidance on when to use vs. alternative tools (e.g., retrieve_multiple_tasks). Context of use is implied but not explicit.

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