Skip to content

feat: Implement MCP server instruction fetching and integration#7334

Open
seuros wants to merge 1 commit intoanomalyco:devfrom
seuros:instruction
Open

feat: Implement MCP server instruction fetching and integration#7334
seuros wants to merge 1 commit intoanomalyco:devfrom
seuros:instruction

Conversation

@seuros
Copy link
Copy Markdown
Contributor

@seuros seuros commented Jan 8, 2026

Now the LLM can see the instructions that that the server emit at initialisation.

The data was where, just not used.

Fixes #7373

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 8, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@seuros seuros force-pushed the instruction branch 2 times, most recently from 67e6dd6 to 1a95b75 Compare January 8, 2026 18:57
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 8, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@seuros seuros force-pushed the instruction branch 4 times, most recently from d2dc000 to de40032 Compare January 12, 2026 18:37
@thdxr thdxr force-pushed the dev branch 3 times, most recently from f1ae801 to 08fa7f7 Compare January 30, 2026 14:37
@seuros seuros force-pushed the instruction branch 3 times, most recently from 1b41755 to fa38aec Compare February 23, 2026 11:15
@jcdickinson
Copy link
Copy Markdown

Confirmed working on my side. Before, After.

Copy link
Copy Markdown
Contributor

@altendky altendky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I just discovered myself that the instructions are not presented to the model. No wonder it was doing silly things. :] Maybe a little activity here will help get some attention and move this along. I had a couple questions as I read through the changes.

I noticed getInstructions() on the SDK client is a synchronous getter (it just reads a field set during initialize). Was there a reason you wrapped it in an async helper with try/catch? Relatedly, create() already runs for all three paths (init, connect(), add()), so I was wondering if reading it there would avoid needing the separate function — and would also pick up instructions on reconnect/add, which I think the current version misses?

On the refresh functions and InstructionsChanged event — are those intended for a follow-up, or is there something I'm not seeing? I couldn't find an MCP protocol notification for instructions changing mid-session (unlike notifications/tools/list_changed for tools), so I wasn't sure what would trigger them.

Thanks for submitting the feature request and providing an implementation here. I'm hoping we get to start using this soon!

Copy link
Copy Markdown
Contributor

@altendky altendky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! a few more detailed comments here. to be clear, i'm just another contributor looking to get this merged, but after we get done here i'll bring it up in discord. hopefully with two of us involved it can float above the masses. :]

Copy link
Copy Markdown
Contributor

@altendky altendky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

looks good to me. thanks @seuros!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: MCP Server instructions exposure

3 participants