Skip to main content
Glama
rspace-os

RSpace MCP Server

Official
by rspace-os

search_recent_documents

Find recently modified documents in RSpace by specifying a timeframe and optional text search to locate current research data.

Instructions

Search for recently modified documents

Usage: Find documents modified within a specific timeframe

Parameters:

  • days_back: Number of days to look back

  • query: Optional text search within recent documents

  • page_size: Number of results to return

Returns: Dictionary with recent documents

Example: search_recent_documents(7, "experiment")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
days_backNo
queryNo
page_sizeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:313-352 (handler)
    The handler function implementing the search_recent_documents tool. Registered via @mcp.tool decorator. Searches RSpace documents modified within the last N days, optionally filtered by a query string, using AdvancedQueryBuilder and eln_cli.get_documents_advanced_query.
    @mcp.tool(tags={"rspace", "search"})
    def search_recent_documents(
        days_back: int = 7,
        query: str = None,
        page_size: int = 20
    ) -> dict:
        """
        Search for recently modified documents
        
        Usage: Find documents modified within a specific timeframe
        
        Parameters:
        - days_back: Number of days to look back
        - query: Optional text search within recent documents
        - page_size: Number of results to return
        
        Returns: Dictionary with recent documents
        
        Example: search_recent_documents(7, "experiment")
        """
        from datetime import datetime, timedelta
        
        # Calculate date range - RSpace expects "startDate;endDate" format for date ranges
        start_date = (datetime.now() - timedelta(days=days_back)).strftime("%Y-%m-%d")
        end_date = datetime.now().strftime("%Y-%m-%d")
        date_range = f"{start_date};{end_date}"
        
        builder = AdvancedQueryBuilder(operator="and")
        builder.add_term(date_range, AdvancedQueryBuilder.QueryType.LAST_MODIFIED)
        
        if query:
            builder.add_term(query, AdvancedQueryBuilder.QueryType.GLOBAL)
        
        advanced_query = builder.get_advanced_query()
        return eln_cli.get_documents_advanced_query(
            advanced_query=advanced_query,
            order_by="lastModified desc",
            page_number=0,
            page_size=page_size
        )
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the tool returns a dictionary with recent documents but lacks details on behavioral traits like pagination (implied by 'page_size' but not explained), rate limits, authentication needs, error handling, or what constitutes 'recent' beyond the 'days_back' parameter. The description provides basic function but misses key operational context.

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 well-structured with clear sections (purpose, usage, parameters, returns, example) and uses bullet points for parameters. It's appropriately sized with no redundant sentences, though the 'Returns' line is somewhat vague and could be more specific.

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 no annotations, 0% schema coverage, but an output schema exists, the description is moderately complete. It covers the basic purpose, parameters, and return type, but lacks details on behavioral aspects like pagination, error cases, or how 'recent' is defined. The output schema likely handles return values, but the description doesn't fully compensate for missing annotation context.

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?

Schema description coverage is 0%, so the description must compensate. It lists all three parameters with brief explanations ('days_back: Number of days to look back', etc.), adding meaning beyond the bare schema. However, it doesn't detail constraints (e.g., valid ranges for 'days_back' or 'page_size') or the interaction between 'query' and recency, leaving some semantic gaps.

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 searches for recently modified documents, specifying the verb 'search' and resource 'recently modified documents'. However, it doesn't explicitly differentiate from sibling tools like 'search_documents' or 'find_documents_by_content', which appear to offer broader or different search capabilities.

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 implies this tool should be used to find documents modified within a specific timeframe, but it doesn't explicitly state when to use this versus alternatives like 'search_documents' or 'find_documents_by_content'. The guidance is present but limited to implied context without clear exclusions or comparisons.

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