Skip to content

feat(mcp): declare tool-surface boundaries in MCP server instructions - #162

Open
adityamparikh wants to merge 1 commit into
apache:mainfrom
adityamparikh:feat/mcp-server-instructions
Open

feat(mcp): declare tool-surface boundaries in MCP server instructions#162
adityamparikh wants to merge 1 commit into
apache:mainfrom
adityamparikh:feat/mcp-server-instructions

Conversation

@adityamparikh

Copy link
Copy Markdown
Contributor

Motivation

spring.ai.mcp.server.instructions currently carries a generic one-liner. The MCP initialize response 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:

  • discover-before-acting guidance (list-collections, get-schema first)
  • what the surface does not include: no delete tools, no field drop/alter, no debugQuery, no vector/KNN, field facets only
  • schema modification is additive only (add-fields, add-field-types); type changes require reindexing elsewhere

Property-value-only change — no code touched. ./gradlew build passes (unit + Testcontainers integration tests).

🤖 Generated with Claude Code

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>
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