Skip to main content
Glama

Query facts

lore_query_facts

Query a bitemporal fact store to retrieve currently valid facts or point-in-time truth, see what was known on a date, and trace supersession history.

Instructions

Query the bitemporal fact store. Default: currently-valid facts. asOf answers "what was true on DATE", asKnownAt answers "what did we know on DATE"; includeHistory shows the full supersession chain. Prefer this over lore_search for factual slots (status, location, role, preference). Returns { facts } and, when the result is a sample, a truncated field with { shown, of, rest } — narrow by subject or raise limit before concluding a fact does not exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asOfNoISO date: what was TRUE on this date
limitNomax facts to return (default 200)
subjectNo
asKnownAtNoISO date: what was KNOWN on this date. Facts recorded later are excluded however far back their validity was backdated — use it to reconstruct what a past decision was based on. Combine with asOf for "what was true then, as far as we knew then".
predicateNo
includeHistoryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.38.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden; it discloses the default scope (currently-valid facts), supersession-chain behavior, and the return shape including the `truncated` sampling field with its { shown, of, rest } structure. It stops short of covering auth, rate limits, or ordering, but the sampling warning is a substantive behavioral disclosure few definitions include.

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?

Front-loads the default and the two temporal modes, then the sibling routing rule, then the return/truncation warning. Every sentence adds decision-relevant information with no filler.

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

Completeness4/5

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

For a six-parameter read tool with no output schema and no annotations, the description supplies default scope, temporal semantics, return shape, and a false-negative guard ('narrow by subject or raise limit before concluding a fact does not exist'). Predicate semantics and result ordering are the only omissions.

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?

With schema coverage at only 50%, the description compensates well: it explains asOf, asKnownAt (including the backdating exclusion rule), includeHistory, and the limit/subject narrowing. Only `predicate` goes unexplained, a minor gap against five well-contextualized 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?

States a specific verb and resource ('Query the bitemporal fact store') and immediately scopes the default behavior, distinguishing it from lore_search by naming the exact domain it owns (factual slots). An agent can select this over siblings without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the alternative ('Prefer this over lore_search for factual slots') with the condition that selects it, and disambiguates the two temporal modes by their question form ('what was true on DATE' vs 'what did we know on DATE'), giving when-to-use guidance for each parameter mode.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.