feat(mcp): declare tool-surface boundaries in MCP server instructions - #162
Open
adityamparikh wants to merge 1 commit into
Open
feat(mcp): declare tool-surface boundaries in MCP server instructions#162adityamparikh wants to merge 1 commit into
adityamparikh wants to merge 1 commit into
Conversation
The MCP initialize response carries server-level instructions that every client receives. Use them to state what this surface does NOT include (delete, field drops/alters, debugQuery, vector/KNN, non-field facets) and that schema modification is additive only, so LLM clients stop guessing at tools that don't exist and route around the gaps instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: adityamparikh <aditya.m.parikh@gmail.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.
Motivation
spring.ai.mcp.server.instructionscurrently carries a generic one-liner. The MCPinitializeresponse delivers these instructions to every client, making them the right home for surface-wide facts that no individual tool description can own.Without them, LLM clients that know Solr well tend to hunt for tools that don't exist (delete-documents, debug-query, KNN search) or attempt unsupported operations (changing an existing field's type). Declaring the boundaries up front lets clients route around gaps instead of failing into them.
Changes
Rewrites the instructions to declare:
list-collections,get-schemafirst)add-fields,add-field-types); type changes require reindexing elsewhereProperty-value-only change — no code touched.
./gradlew buildpasses (unit + Testcontainers integration tests).🤖 Generated with Claude Code