Skip to content

Handle MCP tool setup failures - #2653

Open
erichare wants to merge 14 commits into
fix/mcp-readable-resultsfrom
fix/mcp-setup-errors
Open

erichare wants to merge 14 commits into
fix/mcp-readable-resultsfrom
fix/mcp-setup-errors

Conversation

@erichare

@erichare erichare commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does:

Defers MCP context setup and handles request, schema, and provider setup failures at one shared boundary. Known non-security Data API errors keep their codes and messages, while unexpected setup failures return a generic error. Authentication/security, protocol, cancellation, and processor failures keep their existing handling.

This builds on #2652.

Which issue(s) this PR fixes:

Fixes #2628. OAuth admission remains in #2642.

Verification

35 focused tests passed with 0 failures, 0 errors, and 0 skips on commit 71765e205. The formatter check also passed in the same invocation.

JAVA_HOME=/Library/Java/JavaVirtualMachines/graalvm-21.jdk/Contents/Home ./mvnw -B -ntp test '-Dtest=McpSetupErrorsTest,McpResourceTest' -DskipITs -Dxml-format.skip=true

Integration tests and manual client checks were not run in this cleanup.

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 17:14
@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 55.07%
This PR 55.60%
Delta 🟢 +0.53%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 55.6% -0.04% 🍏
Files changed 86.36% 🍏

File Coverage
McpResource.java 90.25% -9.75% 🍏

@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 73.04%
This PR 73.05%
Delta 🟢 +0.01%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 73.05% -0.05% 🍏
Files changed 81.82% 🍏

File Coverage
McpResource.java 85.36% -12.9% 🍏

@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.35%
This PR 74.36%
Delta 🟢 +0.01%
✅ 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.36% -0.05% 🍏
Files changed 81.82% 🍏

File Coverage
McpResource.java 85.36% -12.9% 🍏

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: Return useful errors when tool setup fails

1 participant