Skip to main content
Glama
grafeo-mcp

grafeo-mcp

Official
by GrafeoDB

query_as_of

Read-only

Run a read-only GQL query against the graph as it existed at a past time, using retained history to inspect earlier states.

Instructions

Run one reading GQL statement against the graph as it was at as_of (time travel).

Needs a server that keeps history (GRAFEO_HISTORY_RETENTION). Same rules and result as execute_gql. Example: query_as_of("MATCH (p:Person) RETURN p.name, p.age", "3600")

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": {
      "query": "<query>",
      "as_of": "<as_of>"
    },
    "name": "query_as_of"
  }
}

Input Schema

NameRequiredDescriptionDefault
as_ofYesSeconds ago ("300") or an ISO-8601 datetime with its offset ("2026-11-09T10:00:00+00:00").
limitNoMost rows to return.
queryYesOne reading GQL statement.
paramsNoValues for $name in the query.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint=true, openWorldHint=false), and the description adds meaningful behavior beyond them: the history-retention prerequisite, which is the main failure mode for this tool, and the claim that results match execute_gql. It does not say what happens when as_of predates the retention window.

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?

Three short lines, front-loaded with purpose, then prerequisite, then a concrete example. The example earns its place by showing argument order and string-typed as_of; nothing is padded.

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 read-only 4-parameter query tool with full schema coverage and no output schema, the definition covers purpose, precondition, and a usage example. Only the out-of-retention-window behavior is unaddressed, which is a minor gap.

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 100%, so query, as_of, limit, and params are already documented in structured form. The example shows string-formatted seconds ("3600") for as_of, which mildly reinforces the schema but adds no new semantics.

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 (run one reading GQL statement) plus the distinguishing scope (the graph as it was at as_of, time travel). It also anchors itself to execute_gql, so an agent can tell immediately that this is the historical variant rather than a lookup or mutation tool.

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?

Gives a real precondition — the server must keep history (GRAFEO_HISTORY_RETENTION) — and implicitly routes current-state queries to execute_gql by saying the rules and result are the same. It stops short of an explicit 'use execute_gql when you want the present state' exclusion.

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