Repository navigation
IMP Label every MCP tool result as recorded data - #65
Merged
Merged
Conversation
The recorded_data note lived in the presenter's envelope, so a tool another module adds, building its own envelope, reached the agent without it. The server now adds it to every successful result that does not carry one.
This was referenced Oct 31, 2026
Merged
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.
Fixes 64.
Cause
The
recorded_datanote was part ofMcpProfilePresenter::envelope(). A tool from another module builds its own envelope, so its results reached the agent without the warning. Found while reviewing the Commerce365 add-on, whose two tools return Hub and Business Central bodies.Fix
Mcp\Server::callTool()adds the note, right afterstatus, to every successful result that has none. A tool that sets its own keeps it; an error result gets none.McpProfilePresenter::RECORDED_DATA_NOTEis public so the server uses the same words.Checks
ServerTestcases: the note and its position on a plain tool result, a tool's own note kept, no note on an error.