This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-mcp.git
The following commit(s) were added to refs/heads/main by this push:
new c011b0e docs(collection): explain null cache/handler stats on Solr 10
(#163)
c011b0e is described below
commit c011b0e59d8062545096ea47be8ada9ed1a8425d
Author: Aditya Parikh <[email protected]>
AuthorDate: Tue Aug 18 17:10:41 2026 -0400
docs(collection): explain null cache/handler stats on Solr 10 (#163)
On Solr 10 the /admin/mbeans endpoint was removed, so get-collection-stats
degrades gracefully and returns null cacheStats/handlerStats. Nothing on
the tool surface said so, leaving MCP clients to treat the nulls as a
failure and retry or misreport. State the behavior in the tool
description, which every client reads.
Kept to the description only to avoid colliding with PR #111, which
touches the fetchCacheMetrics/fetchHandlerMetrics implementations.
Signed-off-by: adityamparikh <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
---
.../java/org/apache/solr/mcp/server/collection/CollectionService.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/src/main/java/org/apache/solr/mcp/server/collection/CollectionService.java
b/src/main/java/org/apache/solr/mcp/server/collection/CollectionService.java
index 978ed87..c082ce1 100644
--- a/src/main/java/org/apache/solr/mcp/server/collection/CollectionService.java
+++ b/src/main/java/org/apache/solr/mcp/server/collection/CollectionService.java
@@ -504,7 +504,9 @@ public class CollectionService {
@McpTool(
name = "get-collection-stats",
annotations = @McpTool.McpAnnotations(readOnlyHint =
true),
- description = "Get stats/metrics on a Solr collection")
+ description = "Get stats/metrics on a Solr collection.
On Solr 10+ cacheStats and"
+ + " handlerStats are always null
because the /admin/mbeans endpoint was removed"
+ + " from Solr; this is expected and not
an error.")
public SolrMetrics getCollectionStats(
@McpToolParam(description = "Solr collection to get
stats/metrics for") String collection)
throws SolrServerException, IOException {