update_document
Modify existing RSpace document content, name, tags, or metadata to keep research documentation current and organized.
Instructions
Updates existing RSpace document content and metadata
Usage: Modify document name, tags, or field content Fields format: [{"id": field_id, "content": "new HTML content"}] Returns: Updated document information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | ||
| fields | No | ||
| form_id | No | ||
| name | No | ||
| tags | No |
Implementation Reference
- main.py:148-170 (handler)The @mcp.tool decorated function that defines and implements the 'update_document' tool. The type annotations serve as the input schema, the decorator handles registration, and the function body executes the tool logic by delegating to eln_cli.update_document.@mcp.tool(tags={"rspace"}) def update_document( document_id: int | str, name: str = None, tags: List[str] = None, form_id: int | str = None, fields: List[dict] = None ) -> dict: """ Updates existing RSpace document content and metadata Usage: Modify document name, tags, or field content Fields format: [{"id": field_id, "content": "new HTML content"}] Returns: Updated document information """ return eln_cli.update_document( document_id=document_id, name=name, tags=tags, form_id=form_id, fields=fields )