Tool reference · Knowledge graph & temporal facts
memory_temporal_query
Does exact date calculations: the relation between two time intervals, the duration between two dates, or turning a phrase like "last Friday" into a date.
local stdio server read-only
When to use
- You need a reliable answer to "how many days between X and Y" instead of guessing.
- You want to check whether two periods overlap, meet or contain each other.
- A user wrote a relative date ("two weeks ago", "в прошлый вторник") and you need an ISO date.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
oprequired | "relation" | "duration_between" | "normalize" | — | — |
a_start | string | — | ISO datetime — relation only |
a_end | string | — | — |
b_start | string | — | — |
b_end | string | — | — |
a | string | — | ISO datetime — duration_between |
b | string | — | — |
phrase | string | — | Natural-language date — normalize |
anchor | string | — | ISO datetime anchor for relative phrases |
lang | "auto" | "en" | "ru" | "auto" | — |
Example
Arguments
{
"op": "duration_between",
"a": "2026-06-10T00:00:00",
"b": "2026-09-25T00:00:00"
} Result shape
{
"op": "duration_between",
"seconds": 9244800,
"days": 107,
"weeks": 15,
"months": 3,
"years": 0,
"human_en": "3 months 16 days",
"human_ru": "3 месяца 16 дней"
} op "relation" returns {op, relation} with an Allen code such as "b", "o" or "d". op "normalize" returns {op, phrase, iso, kind, confidence}, or result: null when the phrase is not understood.
Values are illustrative; the keys follow the server's handler. MCP clients receive the result as JSON text content.
Server description
The description the server sends to your agent in tools/list, captured from the v14.7.0 source:
deterministic temporal reasoning — Allen interval relations, duration arithmetic (days/weeks/months/years), and natural-language date normalization (en + ru). Pass op=relation|duration_between|normalize.