adityamparikh opened a new pull request, #194:
URL: https://github.com/apache/solr-mcp/pull/194
## Summary
- Add `index-json-file` so clients can reuse a saved JSON dataset without
repeatedly sending its contents through the model.
- Surface schema-first guidance before indexing and make the tutorial follow
that workflow.
- Ignore blank optional search entries while preserving valid arguments, and
return actionable MCP errors instead of backend exception details.
## File-ingestion boundary
- Disabled by default; operators opt in with `SOLR_MCP_INGEST_ROOT` pointing
to a dedicated server-side data directory.
- Accepts relative or absolute paths inside that root, checks real-path
containment, requires regular UTF-8 JSON files, and bounds reads to 10 MiB.
- No URL fetching or client-filesystem access. The root and its ancestors
must be controlled by trusted local users; this is not a sandbox against
concurrent hostile filesystem writers.
- Uses the existing indexing authentication gate and returns actual counts
and field names, not file contents.
- README and threat model document the shared-directory and HTTP
authorization implications.
## Verification
- `./gradlew spotlessApply build --console=plain` passed during
implementation.
- Final `./gradlew build --console=plain` passed on Java 25.
- Unit and real-Solr/MCP integration coverage includes reuse of the
61-document dataset, path restrictions, invalid/oversized files,
default-disabled ingestion, blank search arguments, and sanitized tool errors.
- IDE build and `git diff --check` passed.
- Native images and additional Solr versions were not tested.
## Try locally
Use Java 25 and a running Solr instance. Set `SOLR_MCP_INGEST_ROOT` in the
MCP server environment to a dedicated directory containing `shows.json`, then
restart the server. Follow `docs/tutorial.md` to define the schema and call
`index-json-file` with `{"collection":"shows","path":"shows.json"}`. The same
path can be reused for another prepared collection.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]