Skip to main content
Glama
rspace-os

RSpace MCP Server

Official
by rspace-os

get_single_Rspace_document

Retrieve complete content of a single RSpace document using its ID for reading or analysis purposes.

Instructions

Retrieves complete content of a single document

Usage: Get full document text for reading/analysis Parameters: doc_id can be numeric ID or string globalId (e.g., "SD12345") Returns: Full document with concatenated field content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesconcatenated text content from all fields

Implementation Reference

  • main.py:131-146 (handler)
    Handler function that retrieves a single RSpace ELN document by ID (numeric or global ID), fetches its full content using eln_cli, concatenates all field contents into a single 'content' string, and returns it as a FullDocument model instance.
    @mcp.tool(tags={"rspace"}, name="get_single_Rspace_document")
    def get_document(doc_id: int | str) -> FullDocument:
        """
        Retrieves complete content of a single document
        
        Usage: Get full document text for reading/analysis
        Parameters: doc_id can be numeric ID or string globalId (e.g., "SD12345")
        Returns: Full document with concatenated field content
        """
        resp = eln_cli.get_document(doc_id)
        # Concatenate all field content for easier processing
        resp['content'] = ''
        for fld in resp['fields']:
            resp['content'] = resp['content'] + fld['content']
        return resp
  • main.py:47-50 (schema)
    Pydantic model used as the return type for the get_single_Rspace_document tool, defining a document with a single concatenated 'content' field containing all text from the document's fields.
    class FullDocument(BaseModel):
        """Complete ELN document with all content concatenated"""
        content: str = Field(description="concatenated text content from all fields")
  • main.py:131-131 (registration)
    FastMCP decorator that registers the get_document function as the tool named 'get_single_Rspace_document' with 'rspace' tag.
    @mcp.tool(tags={"rspace"}, name="get_single_Rspace_document")
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions retrieving 'complete content' and 'concatenated field content', which adds some behavioral context about the return format. However, it lacks details on permissions, rate limits, error handling, or whether it's a read-only operation (implied but not stated), making it insufficient for a mutation-aware agent.

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 front-loaded with the core purpose, followed by usage, parameters, and returns in separate lines. It's appropriately sized with no redundant information, though the 'Usage' line could be more integrated for better flow.

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 1 parameter with low schema coverage, no annotations, and an output schema (which reduces need to explain returns), the description is moderately complete. It covers purpose and parameter semantics but lacks behavioral details like safety or performance, making it adequate but with gaps for a retrieval tool.

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

Parameters4/5

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

The description adds meaningful semantics beyond the input schema: it explains that 'doc_id' can be numeric ID or string globalId with an example ('SD12345'), and clarifies it retrieves a 'single' document. With 0% schema description coverage and 1 parameter, this compensates well, though it doesn't detail format constraints beyond the example.

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 retrieves complete content of a single document, specifying the verb (retrieves) and resource (document). It distinguishes from sibling tools like 'get_documents' (plural) and 'find_documents_by_content' (search-based), though not explicitly named. However, it doesn't fully differentiate from 'get_container' or 'get_sample' which might also retrieve content, keeping it at 4.

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 description includes a 'Usage' line suggesting when to use it ('for reading/analysis'), which implies context. However, it doesn't explicitly state when not to use it or name alternatives like 'get_documents' for multiple documents or 'search_documents' for filtered retrieval, leaving room for improvement.

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