Skip to main content
Glama
rspace-os

RSpace MCP Server

Official
by rspace-os

search_recent_documents

Find recently modified documents in RSpace by searching within a specific timeframe, with optional text filtering to locate relevant research data quickly.

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
page_sizeNo
queryNo

Implementation Reference

  • main.py:313-352 (handler)
    The main handler function for the 'search_recent_documents' MCP tool. It is decorated with @mcp.tool for automatic registration and implements the logic to search RSpace documents modified in the last N days, with optional text query filtering, using an AdvancedQueryBuilder and the eln_cli.
    @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 )

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