Skip to content

fix: add consistent collection name validation to all MCP tool methods#108

Open
adityamparikh wants to merge 1 commit into
apache:mainfrom
adityamparikh:fix/unified-collection-validation
Open

fix: add consistent collection name validation to all MCP tool methods#108
adityamparikh wants to merge 1 commit into
apache:mainfrom
adityamparikh:fix/unified-collection-validation

Conversation

@adityamparikh
Copy link
Copy Markdown
Contributor

Summary

  • Add collection name blank/null validation to checkHealth(), getCollectionStats(), search(), indexJsonDocuments(), indexCsvDocuments(), indexXmlDocuments(), getSchema(), and getSchemaResource()
  • Consistent IllegalArgumentException with clear message for invalid collection names
  • Matches existing pattern in createCollection()

Test plan

  • ./gradlew build passes
  • ./gradlew nativeTest -Pnative passes (119/119 tests)
  • No regressions

🤖 Generated with Claude Code

Unify input validation across MCP tool methods by adding null/blank
collection name checks at the entry point of each method that accepts
a collection parameter. This matches the existing pattern in
createCollection() and ensures a consistent IllegalArgumentException
with a clear message for invalid collection names.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
@adityamparikh adityamparikh force-pushed the fix/unified-collection-validation branch from 14c39e5 to d8ddc16 Compare May 2, 2026 17:04
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.

1 participant