Skip to content

Commit cd1ba74

Browse files
fix(mcp): set hasMore on size-cap trim, fix tools.json wording
1 parent eea4be8 commit cd1ba74

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

openmetadata-mcp/src/main/java/org/openmetadata/mcp/tools/SearchMetadataTool.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ static Map<String, Object> buildEnhancedSearchResponse(
334334
"message",
335335
String.format(
336336
"Found %d total results, showing first %d. "
337-
+ "There are many matching assets — are you looking for something specific? "
337+
+ "There are many matching assets. Are you looking for something specific?"
338338
+ "Try narrowing with a service name, schema name, or more specific search term.",
339339
totalResults, cleanedResults.size()));
340340
result.put("hasMore", true);
@@ -362,11 +362,12 @@ static Map<String, Object> buildEnhancedSearchResponse(
362362
cleanedResults.size());
363363
result.put("results", trimmed);
364364
result.put("returnedCount", trimmed.size());
365+
result.put("hasMore", true);
365366
result.put(
366367
"message",
367368
String.format(
368369
"Response exceeded %d characters and was trimmed to %d of %d results. "
369-
+ "There are many matching assets — are you looking for something specific? "
370+
+ "There are many matching assets. Are you looking for something specific?"
370371
+ "Try narrowing with a service name, schema, or specific name.",
371372
MAX_RESPONSE_CHARS, trimmed.size(), totalResults));
372373
}

openmetadata-mcp/src/main/resources/json/data/mcp/tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"size": {
2828
"type": "integer",
29-
"description": "Number of results to return. Default is 10. For broad or generic queries (e.g. 'show all tables'), keep size small (5-10) so each result includes complete information. Only increase size when the query is specific enough that results will be narrow and focused. Maximum allowed is 50.",
29+
"description": "Number of results to return. Default is 10. For broad or generic queries (e.g. 'show all tables'), keep size small (5-10), as results are summaries; use get_entity_details for full entity info. Only increase size when the query is specific enough that results will be narrow and focused. Maximum allowed is 50.",
3030
"default": 10
3131
},
3232
"includeDeleted": {

0 commit comments

Comments
 (0)