Skip to content

fix: validate MCP commands with the HTTP API constraints - #2655

Open
erichare wants to merge 4 commits into
fix/mcp-tool-behavior-hintsfrom
fix/mcp-command-validation
Open

erichare wants to merge 4 commits into
fix/mcp-tool-behavior-hintsfrom
fix/mcp-command-validation

Conversation

@erichare

@erichare erichare commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does:

Runs Data API command validation before MCP looks up a schema or executes a command. Both transports use the same error mapper for invalid batches and find options.

Which issue(s) this PR fixes:

Fixes #2632. Builds on #2649 and is the base for #2656. Full stack.

Verification

46 focused Java tests passed on JDK 25 at b331935eb. The tests compare accepted commands and rejected inputs through both transports. The shared test-fixture fix is tracked separately in #2661. GitHub checks.

./mvnw -o -B -ntp clean test \
  -DskipITs -Dfmt.skip=true -Dxml-format.skip=true -Dsurefire.failIfNoSpecifiedTests=false \
  -Dquarkus.http.test-port=19281 -Dtest=McpCommandValidationTest,McpResourceTest,McpSetupErrorsTest

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@erichare
erichare requested a review from a team as a code owner October 22, 2026 19:50
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

📈 Unit Test Coverage Delta vs Main Branch

Metric Value
Main Branch 57.12%
This PR 58.18%
Delta 🟢 +1.06%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 58.18% -0.01% 🍏
Files changed 65.85% 🍏

File Coverage
McpResource.java 88.4% -3.06% ❌
FrameworkExceptionMapper.java 35.53% 🍏

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

📈 Integration Test Coverage Delta vs Main Branch (dse69-it)

Metric Value
Main Branch 72.75%
This PR 72.84%
Delta 🟢 +0.09%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 72.84% -0.01% 🍏
Files changed 65.85% 🍏

File Coverage
FrameworkExceptionMapper.java 88.72% 🍏
McpResource.java 82.17% -3.04% ❌

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

📈 Integration Test Coverage Delta vs Main Branch (hcd-it)

Metric Value
Main Branch 74.21%
This PR 74.30%
Delta 🟢 +0.08%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (hcd-it)

Overall Project 74.3% -0.01% 🍏
Files changed 65.85% 🍏

File Coverage
FrameworkExceptionMapper.java 88.72% 🍏
McpResource.java 82.17% -3.04% ❌

@erichare
erichare added this pull request to stack #2660 October 23, 2026 22:14
@erichare
erichare removed this pull request from stack #2660 October 27, 2026 23:11
@erichare
erichare added this pull request to stack #2667 October 27, 2026 23:12
@erichare
erichare force-pushed the fix/mcp-command-validation branch from 3f3c436 to 1a9abb5 Compare October 27, 2026 23:54
@erichare
erichare removed this pull request from stack #2667 November 5, 2026 19:26
@erichare
erichare force-pushed the fix/mcp-command-validation branch from 0d6443e to 078cf84 Compare November 5, 2026 19:28
@erichare erichare changed the title Validate MCP commands with the HTTP API constraints fix: validate MCP commands with the HTTP API constraints Nov 5, 2026
@erichare
erichare added this pull request to stack #2672 November 5, 2026 19:29
@erichare
erichare force-pushed the fix/mcp-command-validation branch from 50ea56a to a1d1ba1 Compare November 19, 2026 05:41

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP: Check command validation against the HTTP API

1 participant