Bug
index.ts calls await fetchAndUpdateSidebar() before registering the BuildOnBase tool, but the guideLink schema description is already created during module import:
params.ts imports findGuideParamsPrompt
findGuideParamsPrompt is exported as a module-level string in utils.ts
- that string calls
getFormattedSidebar() immediately, before index.ts has a chance to fetch the live sidebar
Because of that, a successful sidebar fetch does not update the actual guideLink prompt the MCP tool exposes. The tool keeps advertising the fallback sidebar captured at import time.
Expected behavior
The guideLink parameter prompt should be built after fetchAndUpdateSidebar() runs, so the registered MCP tool reflects the latest sidebar when the fetch succeeds and still falls back cleanly when it fails.
Why this matters
The prompt is what the model uses to map a user request to a Base docs guide URL. If the schema description is stale, new or moved docs can be missed even though the startup fetch succeeded.
Bug
index.tscallsawait fetchAndUpdateSidebar()before registering theBuildOnBasetool, but theguideLinkschema description is already created during module import:params.tsimportsfindGuideParamsPromptfindGuideParamsPromptis exported as a module-level string inutils.tsgetFormattedSidebar()immediately, beforeindex.tshas a chance to fetch the live sidebarBecause of that, a successful sidebar fetch does not update the actual
guideLinkprompt the MCP tool exposes. The tool keeps advertising the fallback sidebar captured at import time.Expected behavior
The
guideLinkparameter prompt should be built afterfetchAndUpdateSidebar()runs, so the registered MCP tool reflects the latest sidebar when the fetch succeeds and still falls back cleanly when it fails.Why this matters
The prompt is what the model uses to map a user request to a Base docs guide URL. If the schema description is stale, new or moved docs can be missed even though the startup fetch succeeded.