tagDocumentOrNotebookEntry
Add tags to RSpace documents and notebook entries to organize research data by project, experiment type, or other categories for improved searchability and categorization.
Instructions
Adds tags to documents for organization and searchability
Usage: Categorize documents by project, experiment type, etc. Tags: Use consistent naming for better organization Returns: Updated document with new tags
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| tags | Yes | One or more tags in a list |
Implementation Reference
- main.py:443-443 (registration)Tool registration using the @mcp.tool decorator, specifying the exact name 'tagDocumentOrNotebookEntry' and rspace tag.@mcp.tool(tags={"rspace"}, name="tagDocumentOrNotebookEntry")
- main.py:444-457 (handler)The core handler function that implements the tool logic: accepts document ID and list of tags, then calls the RSpace ELN client's update_document method to apply the tags, and returns the API response.def tag_document( doc_id: int | str, tags: Annotated[List[str], Field(description="One or more tags in a list")] ) -> Dict[str, any]: """ Adds tags to documents for organization and searchability Usage: Categorize documents by project, experiment type, etc. Tags: Use consistent naming for better organization Returns: Updated document with new tags """ resp = eln_cli.update_document(document_id=doc_id, tags=tags) return resp