fix(runtime): return ai_instructions from the list_metrics_views tool - #9846
Merged
begelundmuller merged 1 commit intoSep 1, 2026
Merged
Conversation
The handler built a res map containing the instance's ai_instructions, but returned a typed result struct without it, so the map was discarded and project ai_instructions never reached MCP clients; the MCP server instructions tell clients to obey an ai_instructions field in tool responses, making this a silent no-op since the tool was introduced. Add the field to ListMetricsViewsResult and populate it for external MCP clients only: Rill's own agents already receive the project instructions directly in their prompts, so including it in their pre-invoked tool results would duplicate it in the conversation. Claude-Session: https://claude.ai/code/session_017udazBgdXmdTXMTq7sTh2L
begelundmuller
deleted the
nishant/fix-list-metrics-views-ai-instructions
branch
September 1, 2026 07:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
list_metrics_viewshandler built aresmap containing the instance'sai_instructions, but returned a typed result struct without it — the map was discarded, so projectai_instructionsnever actually reached MCP clients, even though the MCP server instructions tell clients to obey anai_instructionsfield in tool responses.ListMetricsViewsResultand populates it for external MCP clients only (non-rilluser agents): Rill's own agents already receive the project instructions directly in their prompts, so including it in their pre-invoked tool results would duplicate it in the conversation.Checklist:
https://claude.ai/code/session_017udazBgdXmdTXMTq7sTh2L