diff --git a/src/main/java/org/apache/solr/mcp/server/schema/SchemaService.java b/src/main/java/org/apache/solr/mcp/server/schema/SchemaService.java index 8e0549a1..d46343ab 100644 --- a/src/main/java/org/apache/solr/mcp/server/schema/SchemaService.java +++ b/src/main/java/org/apache/solr/mcp/server/schema/SchemaService.java @@ -261,9 +261,11 @@ public String getSchemaResource(String collection) { * the name of the Solr collection to retrieve schema information for * @return complete schema representation containing all field and type * definitions - * @throws Exception - * if collection does not exist, access is denied, or communication - * fails + * @throws SolrServerException + * if the Solr server returns an error or the collection does not + * exist + * @throws IOException + * if communication with the Solr server fails * @see SchemaRepresentation * @see SchemaRequest * @see org.apache.solr.client.solrj.response.schema.SchemaResponse @@ -273,7 +275,7 @@ public String getSchemaResource(String collection) { name = "get-schema", annotations = @McpTool.McpAnnotations(readOnlyHint = true), description = "Get schema for a Solr collection") - public SchemaRepresentation getSchema(String collection) throws Exception { + public SchemaRepresentation getSchema(String collection) throws SolrServerException, IOException { SchemaRequest schemaRequest = new SchemaRequest(); return schemaRequest.process(solrClient, collection).getSchemaRepresentation(); }