rlm_store_result
Store a sub-call result with an identifier and optional metadata to aggregate results from large dataset processing, enabling recursive chunking and analysis beyond standard context limits.
Instructions
Store a sub-call result for later aggregation.
Args: name: Result set identifier result: Result content to store metadata: Optional metadata about this result
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| result | Yes | ||
| metadata | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/rlm_mcp_server.py:1600-1617 (handler)The actual handler function for the rlm_store_result tool. It stores a sub-call result to a JSONL file under RESULTS_DIR for later aggregation. Decorated with @mcp.tool() to register it as a FastMCP tool.
@mcp.tool() async def rlm_store_result( name: str, result: str, metadata: Optional[dict] = None, ) -> str: """Store a sub-call result for later aggregation. Args: name: Result set identifier result: Result content to store metadata: Optional metadata about this result """ results_file = RESULTS_DIR / f"{name}.jsonl" with open(results_file, "a") as f: f.write(json.dumps({"result": result, "metadata": metadata or {}}) + "\n") return f"Result stored to '{name}'" - src/rlm_mcp_server.py:1599-1605 (registration)The tool is registered with FastMCP via the @mcp.tool() decorator on the rlm_store_result function. This is the registration mechanism.
@mcp.tool() async def rlm_store_result( name: str, result: str, metadata: Optional[dict] = None, ) -> str: - src/rlm_mcp_server.py:1601-1611 (schema)Type annotations serve as the schema: name (str), result (str), metadata (Optional[dict]), and return type str.
async def rlm_store_result( name: str, result: str, metadata: Optional[dict] = None, ) -> str: """Store a sub-call result for later aggregation. Args: name: Result set identifier result: Result content to store metadata: Optional metadata about this result - src/rlm_mcp_server.py:43-43 (helper)RESULTS_DIR is defined as DATA_DIR / 'results', the directory where store_result writes JSONL files.
RESULTS_DIR = DATA_DIR / "results"