Repository navigation
mcp-provider-messages - #935
Merged
Merged
Conversation
…ool results Per-statement OutErrFile capture in the MCP backend (bounded, teed, attributed via the per-statement handler context clone), surfaced as QueryResultDTO.Messages and a labelled messages block in rendered text. Reverse-proxy backend returns rows only (no message channel over database/sql). No engine, srv or CLI change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Robot scenarios: not-found lookup carries the provider 404 message in the structured payload and rendered text; partial result carries the message alongside resolved rows. 06-errors.md and run_select_query.md now say where messages appear per backend. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Description
Adds per-statement engine messages to native-backend
run_select_queryresults. The MCP backend captures the existing diagnostic writer on its per-statement context clone, bounds captured message count and length, and returns messages beside rows in structured content and a labelled text block. Statements without messages retain their current result shape and rendering. The reverse-proxy backend returns rows only because itsdatabase/sqlinterface does not expose a per-statement message channel. No engine, OmniSDK,srv,exec, orshellbehavior was changed.Type of change
Issues referenced.
None known.
Evidence
go build ./...: passed.go test ./pkg/mcp_server/... ./internal/stackql/mcpbackend/...: passed.go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.15.0 run: passed, 0 issues.rowsarray plus the provider 404 message; partial results retained rows and the message.execstdout and stderr.mcp.robot: 85/91 passed. The 6 failures requirepsql, which is not installed; the MCP outputs for the concurrent query cases were correct.go test -timeout 1200s ./...: two packages had pre-existing Windows symlink-privilege failures (handlerandintrinsic). The same failures reproduced onmain; other packages passed.Checklist:
Variations
The full Robot and Go suites could not be fully green in this Windows environment because
psqlis unavailable and Go tests requiring symlink creation lack the required privilege. These failures are environmental; the affected Go package failures were reproduced onmain. Targeted behavior tests, the MCP query subset, and CLI stderr regression tests passed. CI should confirm the full suites and supported platforms.Tech Debt
No new technical debt identified. Reverse-proxy message availability is documented as a limitation of the current
database/sqlmessage channel.