Skip to main content
Glama

recall_by_time

Retrieve memories from any time period using natural language phrases like 'yesterday' or 'last week'.

Instructions

Query memories using natural language time expressions like "yesterday", "last week", "this morning", "before 3pm".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession identifier
expressionYesNatural language time expression like "yesterday", "last week", "before Monday"
limitNoMax results (default 10)

Implementation Reference

  • src/index.ts:196-208 (registration)
    Tool 'recall_by_time' is registered in the ListToolsRequestSchema handler with name, description, and inputSchema requiring sessionId, expression, and optional limit.
    {
      name: 'recall_by_time',
      description: 'Query memories using natural language time expressions like "yesterday", "last week", "this morning", "before 3pm".',
      inputSchema: {
        type: 'object',
        properties: {
          sessionId:  { type: 'string', description: 'Session identifier' },
          expression: { type: 'string', description: 'Natural language time expression like "yesterday", "last week", "before Monday"' },
          limit:      { type: 'number', description: 'Max results (default 10)', default: 10 },
        },
        required: ['sessionId', 'expression'],
      },
    },
  • Input schema for recall_by_time defines properties: sessionId (string), expression (string - natural language time expression), limit (number, default 10). Required: sessionId and expression.
    inputSchema: {
      type: 'object',
      properties: {
        sessionId:  { type: 'string', description: 'Session identifier' },
        expression: { type: 'string', description: 'Natural language time expression like "yesterday", "last week", "before Monday"' },
        limit:      { type: 'number', description: 'Max results (default 10)', default: 10 },
      },
      required: ['sessionId', 'expression'],
    },
  • The handler for 'recall_by_time' in the CallToolRequestSchema switch statement. It calls (memory as any).recallByTime(sessionId, expression, limit) and returns results as JSON.
    case 'recall_by_time': {
      const entries = await (memory as any).recallByTime(
        args.sessionId as string,
        args.expression as string,
        (args.limit as number) || 10
      );
      return { content: [{ type: 'text', text: JSON.stringify(entries, null, 2) }] };
    }
Behavior2/5

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

No annotations are provided, and the description only mentions querying; it does not disclose whether it is read-only, side effects, or behavior on invalid expressions.

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?

A single sentence that is front-loaded with the action and concise, containing no redundant information.

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

Completeness2/5

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

No output schema exists and the description does not explain return format, handling of limit, or role of sessionId, leaving gaps for a moderately complex tool with many siblings.

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 value beyond the input schema by explaining the nature of the 'expression' parameter and giving examples, though schema already covers all parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it queries memories using natural language time expressions, distinguishing it from siblings like recall, recall_recent, and recall_user.

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 implies use for time-based queries but does not explicitly state when to use this tool versus alternatives or provide exclusion criteria.

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/Cartisien/engram-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server