create_document_from_form
Generate structured documents using predefined form templates with validation and pre-populated fields in RSpace.
Instructions
Creates a structured document using a form template
Usage: Generate documents with predefined structure and validation Fields: Pre-populate form fields with initial data Returns: Created document information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | ||
| form_id | Yes | ||
| name | No | ||
| parent_folder_id | No | ||
| tags | No |
Implementation Reference
- main.py:582-603 (handler)The main handler function for the 'create_document_from_form' tool, decorated with @mcp.tool for automatic registration. It creates a structured document in RSpace ELN using a form template by calling the eln_cli.create_document method with provided parameters.def create_document_from_form( form_id: int | str, name: str = None, parent_folder_id: int | str = None, tags: List[str] = None, fields: List[dict] = None ) -> dict: """ Creates a structured document using a form template Usage: Generate documents with predefined structure and validation Fields: Pre-populate form fields with initial data Returns: Created document information """ return eln_cli.create_document( name=name, parent_folder_id=parent_folder_id, tags=tags, form_id=form_id, fields=fields )