Skip to main content
Glama

query_episodes

Retrieve episodic vault records to see current truths, filter by entity, or query what was true or known at a past time; optional text ranks results.

Instructions

Retrieve episodes from an episodic vault. By default only statements that still hold are returned. Filter by entity for 'everything about X', pass valid_at to ask what was true at a past moment, or known_at to ask what the vault had already learned by then. event_metadata_filters keeps episodes that have a confirm, dispute, close or reopen carrying those keys; with known_at, only events recorded by then match, including attestations inherited by a revision. Query text is optional and ranks results; without it the newest come first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "vault_name": "<vault_name>"
    },
    "name": "query_episodes"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
queryNo
entitiesNo
known_atNo
order_byNo
valid_atNo
vault_nameYes
include_closedNo
event_metadata_filtersNo

Output Schema

NameRequiredDescriptionDefault
queryNo
resultsYes
order_byYes
vault_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.10.0
    • addedInput schema / properties / event_metadata_filters
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Event Metadata Filters"
      +}
    • addedOutput schema / $defs / EpisodeMatch / properties / reopen_reason
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Reopen Reason"
      +}
    • addedOutput schema / $defs / EpisodeMatch / properties / reopened_at
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Reopened At"
      +}
  2. First observedv0.9.1

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and delivers the key non-obvious behavior: closed/invalidated statements are excluded by default, results are newest-first when no query is supplied, and query text ranks rather than filters. It stops short of pagination, limit behavior, or permission requirements, which are meaningful gaps for an unannotated read tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and the default filter behavior, then parameter guidance in a single dense paragraph. The event_metadata_filters/known_at sentence is long and nesting-heavy, but no sentence is filler.

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

Completeness3/5

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

For a nine-parameter, unannotated tool this covers the conceptually hard parts well, and the output schema relieves it of explaining return values. It is still incomplete on limit/order_by semantics and on any capacity or permission constraints, which an agent would need to call it reliably.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry parameter meaning; it does well for entities, valid_at, known_at, event_metadata_filters and implicitly include_closed, including the subtle known_at/attestation inheritance rule. However limit, order_by, and vault_name are never explained, leaving three of nine parameters undocumented in both the schema and the description.

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

Purpose4/5

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

'Retrieve episodes from an episodic vault' gives a specific verb and resource, and the body explains the default retention rule ('only statements that still hold are returned'). It never names a sibling such as query or episode_history as the alternative, so the agent must infer differentiation itself.

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

Usage Guidelines4/5

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

Concrete usage scenarios are given for three parameters: entities for 'everything about X', valid_at for 'what was true at a past moment', known_at for 'what the vault had already learned by then'. This is strong within-tool routing, but there is no explicit when-to-use-this-vs-another-tool statement.

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