Repository navigation
Report docs search tool errors - #70
Merged
Merged
Conversation
A failed search_dune_docs call comes back as a result with IsError set. docs search parsed its error text as a search result and exited 0; it now returns the error. Amp-Thread-ID: https://ampcode.com/threads/T-01a1f46d-4de8-7404-a66a-7e2a8be6632a Co-authored-by: Amp <amp@ampcode.com>
norbertdurcansk
approved these changes
Nov 20, 2026
norbertdurcansk
left a comment
Contributor
There was a problem hiding this comment.
Approved, with suggestions. The fix is right: a tool error result now fails the command instead of being printed as a search result with exit 0. TestSearchToolError checks both the error message and that nothing was printed as results, so it would catch a regression.
(Reviewed by reading the code on 763c567; I didn't re-run the tests locally.)
dunemcp.ToolError is the error path of dunemcp.Result, so docs search reports a tool error the same way the other MCP commands do: text blocks joined by newlines, no trailing period, and a message naming the tool when there is no text. Amp-Thread-ID: https://ampcode.com/threads/T-01a1f46d-4de8-7404-a66a-7e2a8be6632a Co-authored-by: Amp <amp@ampcode.com>
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.
dune docs searchnow fails with the server's message when the docs MCP tool returns an error. Before, it printed the error text as a search result and exited 0. Follow-up from Norbert's review of #67.Impact
docs searchonly. An error result (IsError: true) now returnssearching docs: <text>and a non-zero exit, in text and JSON output alike.Context for reviewers
TestSearchToolErrorfails on main and passes here. The test server helper now takes a wholeCallToolResult, so it can return an error result.No visual surface: CLI change with no rendered UI; verified with unit tests (
go vet ./...,go test -race ./...).