Skip to content

fix: describe accepted MCP update syntax in tool schemas - #2651

Merged
erichare merged 5 commits into
mainfrom
fix/mcp-update-wire-schema
Nov 19, 2026
Merged

erichare merged 5 commits into
mainfrom
fix/mcp-update-wire-schema

Conversation

@erichare

@erichare erichare commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does:

Describes all thirteen update operators in the shared UpdateClause schema, including $pullAll, which only tables accept. Each operator description says what it does to Document fields or Table columns, and every operator has an example. The enum and schema use the same wire-name constants. McpClauseSchemaContractTest checks accepted and malformed updates against both the UpdateClause schema and the parser, and checks that all three update tools require an update clause. McpSchemaCustomizerTest covers each rule the schema customizer adds.

Which issue(s) this PR fixes:

Fixes #2631.

Verification

99 focused tests passed with 0 failures, 0 errors, and 0 skips at 9485dc0c8, after merging main. JaCoCo shows those tests cover every line and branch of McpSchemaCustomizer. The local format check did not run because this machine only has JDK 25 and google-java-format 1.21 needs JDK 21, so CI runs it. Manual client checks were not run.

JAVA_HOME=/Library/Java/JavaVirtualMachines/graalvm-25.jdk/Contents/Home ./mvnw clean test -Dfmt.skip=true -Dxml-format.skip=true -Dsurefire.failIfNoSpecifiedTests=false '-Dtest=McpSchemaCustomizerTest,McpClauseSchemaContractTest'

Checklist

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

MCP stack

Merges bottom up; row 1 is the bottom of the stack.

# PR Change Issue
1 #2651 Show accepted update syntax in tool schemas #2631
2 #2658 Describe every tool argument Part of #2604
3 #2645 Close the command context after each call Part of #2629
4 #2653 Return useful errors when setup fails #2628
5 #2648 Keep payloads and credentials out of logs #2635
6 #2649 Describe side effects and retry behavior #2636
7 #2655 Validate commands like the HTTP API #2632
8 #2656 Test request isolation, document tracing Refs #2629
9 #2657 Reject unapproved browser origins Part of #2630
10 #2659 Serve only protocol 2026-07-28 Part of #2625, #2626
11 #2669 Add opt-in OAuth authentication Refs #2642, #2643

@erichare
erichare requested a review from a team as a code owner October 20, 2026 19:56
@erichare
erichare force-pushed the fix/mcp-update-wire-schema branch from 231ab04 to 0405aa0 Compare October 21, 2026 18:51
@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.09%
This PR 57.12%
Delta 🟢 +0.03%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 57.12% 🍏
Files changed 100% 🍏

File Coverage
UpdateOperator.java 100% 🍏
UpdateClause.java 93.18% 🍏

@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.21%
Delta ⚪ 0.00%
ℹ️ Coverage unchanged

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (hcd-it)

Overall Project 74.21% 🍏
Files changed 100% 🍏

File Coverage
UpdateOperator.java 94.21% 🍏
UpdateClause.java 78.98% 🍏

@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.75%
Delta ⚪ 0.00%
ℹ️ Coverage unchanged

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 72.75% 🍏
Files changed 100% 🍏

File Coverage
UpdateOperator.java 94.21% 🍏
UpdateClause.java 78.98% 🍏

@amorton amorton left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few changes pls for text and things

@erichare
erichare requested a review from amorton November 17, 2026 00:04
…contract test

McpSchemaCustomizerTest now covers each rule the customizer adds in four
tests: JSON property names, ignored and hidden fields, descriptions, and
component references. It reaches every line and branch of the customizer.

McpClauseSchemaContractTest keeps the checks that published clause schemas
agree with the server's parsers. Tool payload cases that repeat
McpSchemaIntegrationTest are removed, the update cases run once against
the update clause schema instead of once per tool, and the rerank
credentials case is a row in the override table.

@amorton amorton left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 ship it

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: Show valid update syntax in tool schemas

2 participants