Skip to main content
Glama

resolve_discussion

Resolve a discussion in Storyblok by providing its numeric ID and the timestamp when it was solved.

Instructions

Marks a discussion as resolved via the Storyblok Management API.

  • discussion_id: Numeric ID of the discussion.

  • solved_at: Timestamp when the discussion is resolved (ISO 8601 format).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
discussion_idYesNumeric ID of the discussion
solved_atYesTimestamp when the discussion is resolved (ISO 8601 format)

Implementation Reference

  • The handler function for the 'resolve_discussion' tool. It receives discussion_id and solved_at, constructs a payload with solved_at, sends a PUT request to /discussions/{discussion_id}, and returns the JSON response.
      // Tool: resolve_discussion
      server.tool(
        'resolve_discussion',
        `Marks a discussion as resolved via the Storyblok Management API.
    
    - discussion_id: Numeric ID of the discussion.
    - solved_at: Timestamp when the discussion is resolved (ISO 8601 format).`,
        {
          discussion_id: z.number().describe('Numeric ID of the discussion'),
          solved_at: z.string().describe('Timestamp when the discussion is resolved (ISO 8601 format)'),
        },
        async ({ discussion_id, solved_at }) => {
          try {
            const payload = {
              discussion: {
                solved_at,
              },
            };
            const data = await apiPut(`/discussions/${discussion_id}`, payload);
            return createJsonResponse(data);
          } catch (error) {
            if (error instanceof APIError) {
              return createErrorResponse(error);
            }
            throw error;
          }
        }
      );
  • Input schema for the 'resolve_discussion' tool defining two parameters: discussion_id (z.number()) and solved_at (z.string(), ISO 8601 format).
        `Marks a discussion as resolved via the Storyblok Management API.
    
    - discussion_id: Numeric ID of the discussion.
    - solved_at: Timestamp when the discussion is resolved (ISO 8601 format).`,
        {
          discussion_id: z.number().describe('Numeric ID of the discussion'),
          solved_at: z.string().describe('Timestamp when the discussion is resolved (ISO 8601 format)'),
        },
  • The tool is registered inside the registerDiscussions function via server.tool('resolve_discussion', ...) at line 181-182.
    export function registerDiscussions(server: McpServer): void {
  • The apiPut helper function used by the handler to send a PUT request to the Storyblok Management API with a JSON body.
    export async function apiPut<T = unknown>(
      path: string,
      body: unknown
    ): Promise<T> {
      const url = buildManagementUrl(path);
      const response = await fetch(url, {
        method: 'PUT',
        headers: getManagementHeaders(),
        body: JSON.stringify(body),
      });
      return handleResponse<T>(response, url);
    }
  • The createJsonResponse helper used to format the successful response as JSON.
    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 provided. The description only states the action without disclosing behavioral traits like permissions required, side effects, or reversibility.

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?

Description is concise with two sentences and a bullet list. However, it repeats schema info, which is unnecessary.

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?

Missing output schema and does not describe return values or confirmation. No context on preconditions or error handling.

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%, and the description merely repeats the parameter descriptions from the schema without adding new information.

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 'Marks a discussion as resolved' which is a specific verb and resource. It distinguishes from siblings like 'create_discussion' and 'retrieve_specific_discussion'.

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 like 'resolve_discussion' vs other discussion actions. No mention of prerequisites or conditions.

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