Skip to main content
Glama

ping

Check server health and verify Storyblok API connectivity.

Instructions

Checks server health and Storyblok API connectivity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The ping tool handler function. Registers a tool named 'ping' on the MCP server. When invoked, it performs a health check by calling the Storyblok Management API endpoint (mapi.storyblok.com) with the management token. Returns success if the API is reachable, or an error response with details if not.
    export function registerPing(server: McpServer): void {
      server.tool(
        'ping',
        'Checks server health and Storyblok API connectivity.',
        {},
        async () => {
          try {
            const url = `https://mapi.storyblok.com/?token=${cfg.managementToken}`;
            const response = await fetch(url);
    
            if (response.ok) {
              return {
                content: [
                  {
                    type: 'text' as const,
                    text: 'Server is running and Storyblok API is reachable.',
                  },
                ],
              };
            } else {
              const errorBody = await response.text();
              return {
                isError: true,
                errorCode: 'STORYBLOK_API_ERROR',
                errorMessage: `Storyblok API returned an error. Details: Status: ${response.status} ${response.statusText}, Body: ${errorBody}`,
                content: [
                  {
                    type: 'text' as const,
                    text: `Error: STORYBLOK_API_ERROR - Storyblok API returned an error. Details: Status: ${response.status} ${response.statusText}, Body: ${errorBody}`,
                  },
                ],
              };
            }
          } catch (error) {
            return createErrorResponse(error);
          }
        }
      );
    }
  • The ping tool has no input parameters (empty schema object {}) since it's a simple health check.
    {},
  • Registration call: registerPing(server) is called within registerAllTools() to register the ping tool with the MCP server.
    registerPing(server);
  • Imports createErrorResponse from '../utils/response.js' as a helper for formatting error responses in the ping handler.
    import { createErrorResponse } from '../utils/response.js';
Behavior3/5

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

With no annotations, the description carries the full burden. It indicates the tool checks health and connectivity but does not disclose the return format or whether it is read-only. The agent lacks information about response structure or side effects. A 3 is appropriate as it provides basic behavioral context but misses details.

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, front-loaded sentence with no filler. Every word contributes to the purpose. It is as concise as possible while remaining clear.

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 (no parameters, no output schema), the description is largely complete. It lacks explicit mention of the return value or expected behavior on failure, but for a health check, the agent can infer minimal information. A 4 reflects that it is adequate but could add a note about response format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters, and the schema description coverage is 100% by default. The description adds no value beyond the schema, but since there are no parameters, the baseline of 4 applies. The description could mention that no parameters are needed, but it's not necessary.

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 checks server health and API connectivity. The verb 'Checks' combined with specific resources 'server health and Storyblok API connectivity' provides unambiguous purpose. This distinguishes it from all sibling tools, as none are health checks.

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 implies the tool is for checking connectivity but does not explicitly state when to use it or when alternatives might be better. No exclusions or sibling comparisons are provided. For a simple health check, this may be sufficient, but explicit guidance would improve clarity.

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