get_documents
Retrieve recent RSpace document metadata with pagination to browse and select research documents. Returns document overviews for efficient browsing without full content.
Instructions
Retrieves recent RSpace documents with pagination
Usage: Get overview of recent documents for browsing/selection Limit: Maximum 200 documents per call for performance Returns: List of document metadata (not full content)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_size | No |
Implementation Reference
- main.py:116-129 (handler)Handler function for the 'get_documents' MCP tool. Decorated with @mcp.tool for automatic registration. Retrieves paginated list of recent RSpace ELN documents using the eln_cli client.@mcp.tool(tags={"rspace"}) def get_documents(page_size: int = 20) -> list[Document]: """ Retrieves recent RSpace documents with pagination Usage: Get overview of recent documents for browsing/selection Limit: Maximum 200 documents per call for performance Returns: List of document metadata (not full content) """ if page_size > 200 or page_size < 0: raise ValueError("page size must be less than 200") resp = eln_cli.get_documents(page_size=page_size) return resp['documents']
- main.py:35-40 (schema)Pydantic BaseModel defining the output schema for document metadata returned by get_documents tool.class Document(BaseModel): """ELN Document metadata - used for document listings""" name: str = Field("document's name") globalId: str = Field(description="Global identifier") created: str = Field(description="The document's creation date")