Skip to content

BuildOnBase guideLink prompt is built before the live sidebar can update it #13

Description

@dumanoglu1

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions