Skip to main content
Glama

docs_refresh

Idempotent

Reconnect to SDK documentation and refresh available tools when docs seem stale or unavailable.

Instructions

Reconnect to SDK documentation and refresh available tools. Use if docs seem stale or unavailable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the 'docs_refresh' tool. Clears the GitBook cache, re-fetches tools from the GitBook MCP, and returns a success message with the list of available tools or an error if connection fails.
    server.tool(
      "docs_refresh",
      "Reconnect to SDK documentation and refresh available tools. Use if docs seem stale or unavailable.",
      {},
      { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
      async () => {
        clearGitBookCache();
        const tools = await fetchGitBookTools();
        
        if (tools.length === 0) {
          return {
            content: [{
              type: "text",
              text: `⚠️ Could not connect to docs.sodax.com\n\nThe GitBook MCP may be temporarily unavailable. Try again later or visit https://docs.sodax.com directly.`
            }]
          };
        }
        
        const toolList = tools.map(t => `- \`docs_${t.name}\`: ${t.description}`).join("\n");
        return {
          content: [{
            type: "text",
            text: `✅ Refreshed. ${tools.length} SDK documentation tools available:\n\n${toolList}`
          }]
        };
      }
    );
  • Schema/parameters definition for docs_refresh. The tool takes no parameters (empty object {}) and uses annotations { readOnlyHint: false, destructiveHint: false, idempotentHint: true }.
    {},
    { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
  • Registration of docs_refresh as an MCP tool via server.tool() inside registerGitBookMetaTools(), which is called from registerGitBookProxyTools() in the same file.
    server.tool(
      "docs_refresh",
      "Reconnect to SDK documentation and refresh available tools. Use if docs seem stale or unavailable.",
      {},
      { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
      async () => {
        clearGitBookCache();
        const tools = await fetchGitBookTools();
        
        if (tools.length === 0) {
          return {
            content: [{
              type: "text",
              text: `⚠️ Could not connect to docs.sodax.com\n\nThe GitBook MCP may be temporarily unavailable. Try again later or visit https://docs.sodax.com directly.`
            }]
          };
        }
        
        const toolList = tools.map(t => `- \`docs_${t.name}\`: ${t.description}`).join("\n");
        return {
          content: [{
            type: "text",
            text: `✅ Refreshed. ${tools.length} SDK documentation tools available:\n\n${toolList}`
          }]
        };
      }
    );
  • The clearGitBookCache() helper function called by docs_refresh. It resets cachedTools to null and toolsCacheTime to 0, forcing fetchGitBookTools() to make a fresh request.
    export function clearGitBookCache(): void {
      cachedTools = null;
      toolsCacheTime = 0;
    }
  • Analytics group mapping: docs_refresh is mapped to the 'sdk-docs' group for PostHog event tracking.
    docs_refresh: "sdk-docs",
    docs_list_tools: "sdk-docs",
Behavior4/5

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

Description adds context beyond annotations by explaining the tool reconnects and refreshes. Annotations already indicate idempotentHint=true; the description aligns with this and does not contradict. No destructive or read-only behavior implied.

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?

Two sentences, no wasted words. Front-loaded with the action. Every sentence earns its place.

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?

With no parameters, no output schema, and clear annotations, the description is complete enough for an agent to understand and invoke this tool correctly.

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?

No parameters in the schema, so schema coverage is 100%. The description does not need to add parameter info. Baseline of 4 is appropriate for zero 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 uses specific verbs 'reconnect' and 'refresh' with clear resources 'SDK documentation' and 'available tools'. It clearly distinguishes this tool from sibling tools like docs_getPage or docs_health by being an action-oriented refresh tool.

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

Usage Guidelines4/5

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

Explicitly states when to use the tool: 'if docs seem stale or unavailable.' No mention of when not to use or alternatives, but for a simple refresh tool this is adequate guidance.

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/gosodax/builders-sodax-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server