Skip to main content
Glama
rspace-os

RSpace MCP Server

Official
by rspace-os

get_documents

Retrieve recent RSpace documents with pagination to browse and select research data. Returns document metadata for efficient overview.

Instructions

Retrieves recent RSpace documents with pagination

Usage: Get overview of recent documents for browsing/selection Limit: Maximum 200 documents per call for performance Returns: List of document metadata (not full content)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_sizeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:116-129 (handler)
    The handler function implementing the 'get_documents' MCP tool. It retrieves a paginated list of recent RSpace ELN documents using the eln_cli client and returns them as a list of Document objects. Decorated with @mcp.tool for automatic registration.
    @mcp.tool(tags={"rspace"})
    def get_documents(page_size: int = 20) -> list[Document]:
        """
        Retrieves recent RSpace documents with pagination
        
        Usage: Get overview of recent documents for browsing/selection
        Limit: Maximum 200 documents per call for performance
        Returns: List of document metadata (not full content)
        """
        if page_size > 200 or page_size < 0:
            raise ValueError("page size must be less than 200")
        resp = eln_cli.get_documents(page_size=page_size)
        return resp['documents']
  • main.py:35-40 (schema)
    Pydantic BaseModel defining the output schema for document metadata returned by the get_documents tool.
    class Document(BaseModel):
        """ELN Document metadata - used for document listings"""
        name: str = Field("document's name")
        globalId: str = Field(description="Global identifier")
        created: str = Field(description="The document's creation date")
  • main.py:116-116 (registration)
    The @mcp.tool decorator registers the get_documents function as an MCP tool with the 'rspace' tag. FastMCP framework automatically handles tool discovery and server exposure.
    @mcp.tool(tags={"rspace"})
Behavior4/5

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

With no annotations provided, the description carries the full burden. It effectively discloses key behavioral traits: it's a read operation (implied by 'retrieves'), includes pagination, has a performance limit of 200 documents per call, and returns metadata only (not full content). This covers most essential aspects for a retrieval tool, though it could mention error handling or authentication needs.

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

Conciseness5/5

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

The description is well-structured and concise, with four clear bullet-like statements that each add value: action, usage, limit, and returns. There is no wasted text, and information is front-loaded effectively.

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

Completeness4/5

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

Given no annotations, 1 parameter with low schema coverage, and an output schema present, the description does a good job covering key aspects: purpose, usage, behavioral limits, and return type. It could be more complete by explicitly mentioning the parameter or differentiating from siblings, but it's largely adequate 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 input schema has 1 parameter with 0% description coverage, so the description must compensate. It doesn't explicitly mention the 'page_size' parameter, but it discusses pagination and a limit of 200 documents, which indirectly informs parameter usage. However, it could directly link the limit to the parameter for better clarity.

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 recent RSpace documents with pagination, specifying the resource (RSpace documents) and action (retrieves). It distinguishes from siblings like 'get_single_Rspace_document' by indicating it returns multiple documents, but could be more explicit about differentiation from 'search_documents' or 'find_documents_by_content'.

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 it's for browsing/selection of recent documents, which implies context. However, it doesn't explicitly state when to use this tool versus alternatives like 'search_documents' or 'search_recent_documents', leaving some ambiguity for the agent.

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