Skip to content

host: connected servers' instructions never reach the system prompt #76

Closed

Description

@panyam

An MCP server can send instructions (guidance for the model, which the spec says a host MAY add to the system prompt). chakra's host drops them. defaultPromptBuilder (host/skills.go) has two sections, cfg.Instructions and skillsSection, and nothing reads what a connected server says about itself. host/app.go creates a client.Client per server and never looks at its instructions.

Until now the client had nowhere to put them: mcpkit sent instructions inside serverInfo, off-spec, and its client never surfaced them (panyam/mcpkit#1560). panyam/mcpkit#1561 fixes the wire and adds Client.Instructions, filled on both the legacy and stateless wires.

Change: add a section after the base instructions that, for each connected server in config order, emits clientByID[id].Instructions under the same origin labelling withOriginHeader gives skill blocks. It should be recomputed each turn like skillsSection, so a late-connecting server's instructions land on the next turn. Empty instructions contribute nothing.

Test: a server built with server.WithInstructions("..."), connected through the host; Build() includes the text with its origin label, and a server without instructions leaves no gap.

Waiting on: mcpkit v0.8.2, the first tag carrying #1561. Bump github.com/panyam/mcpkit from v0.7.2 to that tag in the same PR. It is also a breaking release for core.ServerInfo.Instructions, which chakra does not use, so the bump should be version-only otherwise.

Relevant to #57: an agentchat session pointed at a server like declaire currently never tells the model what that server is for.

Activity

  1. added
    P2Planned, has a consumer, not urgent
    waitingParked until the trigger in its body exists
    on Oct 18, 2026
  2. added and removed
    waitingParked until the trigger in its body exists
    on Oct 22, 2026
  3. panyam commented on Oct 22, 2026

    @panyam
    OwnerAuthor

    Unparking: the trigger has happened. mcpkit v0.8.2 is tagged and includes #1561 (merge 0845457). Stays P2. It's linked as a blocker of both #57 (as the body says) and #89.

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

    P2Planned, has a consumer, not urgentmission_host_completionServes the host_completion mission

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions