docs_refresh
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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/gitbookProxy.ts:182-208 (handler)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}` }] }; } ); - src/tools/gitbookProxy.ts:185-186 (schema)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 }, - src/tools/gitbookProxy.ts:182-208 (registration)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}` }] }; } ); - src/services/gitbookProxy.ts:191-194 (helper)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; } - src/services/analytics.ts:68-69 (helper)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",