Skip to main content
Glama
rspace-os

RSpace MCP Server

Official
by rspace-os

create_document_from_form

Generate structured documents using form templates with predefined fields and validation rules to organize research data 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
NameRequiredDescriptionDefault
form_idYes
nameNo
parent_folder_idNo
tagsNo
fieldsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:581-602 (handler)
    The handler function for the 'create_document_from_form' MCP tool. Decorated with @mcp.tool, it invokes the RSpace ELN client to create a new document instance from the specified form template, supporting optional parameters for name, parent folder, tags, and initial field values.
    @mcp.tool(tags={"rspace"})
    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
        )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'validation' and 'pre-populate form fields' which hints at constraints, but doesn't specify what happens on validation failure, whether the document is editable after creation, what permissions are required, or error handling. For a creation tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with three bullet-like sections (Creates..., Usage..., Fields..., Returns...). Each sentence serves a purpose, though the 'Returns' line is redundant given the presence of an output schema. No wasted words, but could be more front-loaded with critical information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters with 0% schema coverage and no annotations, the description is incomplete—it doesn't explain most parameters or their constraints. However, the presence of an output schema means return values are documented elsewhere, and the description at least covers the core purpose. For a document-creation tool with multiple parameters, more guidance is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'Fields: Pre-populate form fields with initial data' which loosely corresponds to the 'fields' parameter, but doesn't explain the other 4 parameters (form_id, name, parent_folder_id, tags) or their relationships. The description adds minimal value beyond what's implied by the tool name.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Creates a structured document using a form template' specifies the verb (creates), resource (structured document), and method (using a form template). It distinguishes from siblings like 'create_form' (which creates forms) or 'create_sample' (which creates samples), but doesn't explicitly contrast with other document-creation tools like 'createNewNotebook' or 'createNotebookEntry'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Usage' line provides implied context: 'Generate documents with predefined structure and validation' suggests this tool is for when you need documents with specific validation rules. However, it doesn't explicitly state when to use this versus alternatives like 'createNewNotebook' or 'create_sample', nor does it mention prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rspace-os/rspace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server