- Changed search_objects function to return only object IDs instead of full objects
- Updated response format to include object_ids, total_count, page_num, and page_size
- Increased default page size from 1 to 25 for better performance
- Updated documentation to reflect new return format
This improves performance by reducing response size and encourages proper
use of cordra:// resources for full object retrieval.
Change the default limit parameter for search_objects from None to 1
to optimize for single object searches. This makes the API more
intuitive for common use cases where users want to find a specific
object without specifying pagination parameters.
Changes:
- Update limit parameter type from `int | None = None` to `int = 1`
- Remove conditional logic handling None values
- Update documentation to reflect new default
- Update all tests to expect new default behavior
This improves usability for exploratory searches while maintaining
full pagination functionality when larger limits are specified.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add page_num parameter to the search_objects tool to enable pagination
control for users. This provides full pagination functionality while
maintaining backward compatibility.
Changes:
- Add page_num parameter with default value of 0 (0-based pagination)
- Update tool description to document pagination parameters
- Enhance docstring to explain page_num and clarify limit as page_size
- Add comprehensive tests for pagination scenarios
- All existing functionality remains unchanged
Users can now paginate through search results:
- search_objects("query") - first page, 20 results
- search_objects("query", limit=50) - first page, 50 results
- search_objects("query", page_num=1) - second page, 20 results
- search_objects("query", limit=10, page_num=5) - sixth page, 10 results
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
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>
The schema resource registration was only fetching the first page of
schemas from Cordra, causing schemas beyond the page limit to not be
registered as MCP resources.
Changes:
- Enhanced find() method to support pagination with page_size/page_num
- Modified schema registration to paginate through all results
- Updated return structure to include pagination metadata
- Added comprehensive test coverage for pagination scenarios
- Maintains backward compatibility with existing code
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add new MCP resource cordra://design to retrieve Cordra's central design object
containing repository configuration, type definitions, and system settings.
- Add CordraClient.get_design() method using /api/objects/design endpoint
- Add get_cordra_design() resource handler with proper MCP annotations
- Include comprehensive error handling for authentication failures
- Document administrative privilege requirements in descriptions
- Add complete test coverage for both client and server functionality
The design object provides AI systems access to understand the complete
data model and configuration structure of a Cordra repository.
Implement MCP tool to search Cordra repository using Lucene/Solr syntax.
Enables AI assistants to discover and filter digital objects by content,
type, and other metadata fields.
Features:
- Lucene/Solr compatible query syntax support
- Optional type filtering (e.g., Person, Document)
- Configurable result limits with sensible defaults
- Comprehensive error handling and validation
- JSON formatted results with proper indentation
Technical changes:
- Enhanced CordraClient.find() with type and limit parameters
- Added search_objects MCP tool with detailed annotations
- Removed unused tools module in favor of decorator approach
- Added 12 comprehensive unit tests covering all scenarios
- Add find method to CordraClient for querying objects
- Implement cordra://schemas resource for listing available type schemas
- Add comprehensive unit tests for both client find method and server schema listing
- Handle CordraPy response format with results array extraction
- Support schema name extraction from returned objects