Repository navigation
fix(mcp): expose wiki output in structured content - #3590
Merged
lyingbug merged 1 commit intoSep 24, 2026
Merged
Conversation
10 of 17 tasks
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.
Description
MCP clients that only inspect
structuredContentcurrently receive Wiki routing metadata but not the page/search body. The Wiki MCP handlers pass the body only as the text fallback whileDatacontains only metadata.This change adds the human-readable tool output as
Data["content"]forwiki_searchandwiki_read_pagebefore the existing MCP conversion. It intentionally leaves the shared converter and other tools unchanged, avoiding a payload change forsearch_knowledge/read_document.Type of Change
Related Issue
Fixes #3575
Testing
go test ./internal/mcpserver -count=1go vet ./internal/mcpservergolangci-lint run --new-from-rev=origin/main ./internal/mcpservergofmt -l internal/mcpserver/tools_wiki.go internal/mcpserver/tools_wiki_test.gogit diff --checkThe focused test covers existing metadata preservation, nil structured data, existing
contentpreservation, unsuccessful/empty results, the in-memory MCP result, and its JSON wire representation.The full-repository lint/test gate was not claimed because this Windows environment lacks the repository's required native prerequisites: full lint type-checking cannot find
sqlite3.h, andinternal/agent/toolscannot link the prebuilt DuckDB C++ archive with the available MinGW runtime. These failures are outside the changed package; the focused package checks pass.Checklist
git diff --check origin/main...HEADpassesScreenshots / Recordings
Not applicable; this is an MCP response compatibility fix with no UI change.