mirror of
https://github.com/dnlbauer/cordra-mcp.git
synced 2026-09-11 06:05:29 +00:00
refactor: remove unused max_search_results config parameter
The max_search_results configuration parameter was only used in one location and added unnecessary complexity. Search operations now use a consistent default page size of 20, which aligns with the pagination implementation and provides better user experience. Changes: - Remove max_search_results from CordraConfig - Update search_objects to use default page size of 20 - Simplify tests by removing config mocking - Maintain backward compatibility through limit parameter 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -56,8 +56,9 @@ async def search_objects(
|
||||
JSON string containing list of matching objects with their full metadata
|
||||
"""
|
||||
try:
|
||||
effective_limit = limit if limit is not None else config.max_search_results
|
||||
search_result = await cordra_client.find(query, object_type=type, page_size=effective_limit)
|
||||
# Use provided limit or default page size of 20
|
||||
page_size = limit if limit is not None else 20
|
||||
search_result = await cordra_client.find(query, object_type=type, page_size=page_size)
|
||||
results = search_result["results"]
|
||||
return json.dumps(results, indent=2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user