Skip to main content
Glama

docs_health

Read-only

Verify SDK documentation availability for SODAX Builders MCP. Use this tool first when documentation tools appear unavailable to check system status.

Instructions

Check SDK documentation availability. Call this first if docs tools seem unavailable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The docs_health tool handler implementation. This async function checks SDK documentation availability by calling checkGitBookHealth() and fetchGitBookTools(), returning status information about available documentation tools.
    server.tool(
      "docs_health",
      "Check SDK documentation availability. Call this first if docs tools seem unavailable.",
      {},
      DOCS_READ_ONLY,
      async () => {
        const health = await checkGitBookHealth();
        const tools = await fetchGitBookTools();
        
        if (health.healthy && tools.length > 0) {
          const toolNames = tools.slice(0, 5).map(t => `docs_${t.name}`).join(", ");
          return {
            content: [{
              type: "text",
              text: `✅ SDK Docs available. ${health.toolCount} tools ready.\n\nExample tools: ${toolNames}${tools.length > 5 ? "..." : ""}\n\nUse docs_list_tools for the full list, or call any docs_* tool directly.`
            }]
          };
        }
        
        return {
          content: [{
            type: "text",
            text: `⚠️ SDK Docs temporarily unavailable.\n\n**What you can do:**\n1. Try \`docs_refresh\` to reconnect\n2. Visit https://docs.sodax.com directly\n3. Use SODAX API tools (sodax_*) which work independently`
          }]
        };
      }
    );
  • Registration of the docs_health tool using server.tool() with name 'docs_health', description, empty schema (no parameters), DOCS_READ_ONLY annotations, and the async handler function.
    server.tool(
      "docs_health",
      "Check SDK documentation availability. Call this first if docs tools seem unavailable.",
      {},
      DOCS_READ_ONLY,
      async () => {
        const health = await checkGitBookHealth();
        const tools = await fetchGitBookTools();
        
        if (health.healthy && tools.length > 0) {
          const toolNames = tools.slice(0, 5).map(t => `docs_${t.name}`).join(", ");
          return {
            content: [{
              type: "text",
              text: `✅ SDK Docs available. ${health.toolCount} tools ready.\n\nExample tools: ${toolNames}${tools.length > 5 ? "..." : ""}\n\nUse docs_list_tools for the full list, or call any docs_* tool directly.`
            }]
          };
        }
        
        return {
          content: [{
            type: "text",
            text: `⚠️ SDK Docs temporarily unavailable.\n\n**What you can do:**\n1. Try \`docs_refresh\` to reconnect\n2. Visit https://docs.sodax.com directly\n3. Use SODAX API tools (sodax_*) which work independently`
          }]
        };
      }
    );
  • Helper function checkGitBookHealth() that checks if the GitBook MCP server is reachable and returns a health status with the count of available tools.
    export async function checkGitBookHealth(): Promise<{ healthy: boolean; toolCount: number }> {
      try {
        const tools = await fetchGitBookTools();
        return { healthy: true, toolCount: tools.length };
      } catch {
        return { healthy: false, toolCount: 0 };
      }
    }
  • Helper function fetchGitBookTools() that fetches the list of available tools from the GitBook MCP server with caching support (10-minute cache duration).
    export async function fetchGitBookTools(): Promise<GitBookTool[]> {
      // Return cached tools if still valid
      if (cachedTools && Date.now() - toolsCacheTime < TOOLS_CACHE_DURATION) {
        return cachedTools;
      }
      
      try {
        // Initialize connection first
        await initializeConnection();
        
        // Fetch tools list
        const result = await sendMcpRequest("tools/list") as { tools: GitBookTool[] };
        
        cachedTools = result.tools || [];
        toolsCacheTime = Date.now();
        
        if (cachedTools.length > 0) {
          console.error(`✅ Fetched ${cachedTools.length} tools from GitBook MCP`);
        } else {
          console.error(`⚠️ GitBook MCP returned empty tools list`);
        }
        return cachedTools;
      } catch (error) {
        const errorMsg = error instanceof Error ? error.message : "unknown error";
        console.error(`❌ Failed to fetch GitBook tools: ${errorMsg}`);
        // Return cached tools even if expired, or empty array
        return cachedTools || [];
      }
    }
  • Analytics tracking configuration for docs_health tool in the TOOL_GROUPS mapping to the 'sdk-docs' group for PostHog event tracking.
    docs_health: "sdk-docs",
Behavior4/5

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

The description adds valuable context about when to use the tool (as a diagnostic check when other docs tools appear unavailable), which goes beyond what the annotations provide. While annotations already indicate this is a read-only, non-destructive, open-world operation, the description adds practical behavioral guidance about its diagnostic purpose.

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 perfectly concise with just two sentences that each serve a distinct purpose: the first states what the tool does, and the second provides crucial usage guidance. There is zero wasted language, and the information is front-loaded effectively.

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?

For a parameterless diagnostic tool with comprehensive annotations (readOnlyHint, openWorldHint, destructiveHint all specified), the description provides appropriate context about when to use it. While it doesn't explain return values (no output schema exists), it gives sufficient guidance for the agent to understand this tool's role in the documentation toolset.

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?

With 0 parameters and 100% schema description coverage, the baseline would be 4. The description appropriately doesn't discuss parameters since there are none, and it focuses instead on the tool's purpose and usage context, which is the right approach for a parameterless tool.

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 specific action ('Check SDK documentation availability') and resource ('SDK documentation'), distinguishing it from sibling tools like docs_list_tools or docs_searchDocumentation. It provides a precise verb+resource combination that makes the tool's purpose immediately understandable.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool ('Call this first if docs tools seem unavailable'), providing clear contextual guidance. It directly addresses the scenario where other documentation-related tools might not be functioning properly, offering a specific alternative approach.

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

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