BuildOnBase guideLink prompt is built before the live sidebar can update it
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
## 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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading index.ts, params.ts, and utils.ts to trace when the guideLink schema description is created relative to fetchAndUpdateSidebar(). Verify the registered BuildOnBase tool after a successful sidebar fetch and after a failed fetch. Done means the exposed prompt reflects the live sidebar when available and retains the fallback when fetching fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100