Skip to main content
Glama

query_log

Retrieve past questions with their interpretation, SQL, parameters, evidence, warnings, and cost. Filter by recent, errors, diverging interpretations, or empty results.

Instructions

Look back at earlier questions: interpretation, QuerySpec, SQL and parameters, result count, evidence ids, warnings, stage times, tokens and cost.

    view: recent (last n) | warnings (answers that carried warnings) | errors |
          diverging (the same question pattern answered with different SQL — the interpretation moved) |
          path (only questions answered by `path`: fast | cache | llm | structured | entity | none) |
          empty (answers that found nothing — check whether the reading was wrong; with `path`, e.g.
          cache, only those).
    since: only entries asked at or after this time (ISO 8601).
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
pathNo
viewNorecent
sinceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It clearly signals a read/inspection operation by describing the logged fields returned, but never states the operation is read-only, what access it requires, or any retention/limit constraints. Adequate but not rich for a no-annotation tool.

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

Conciseness3/5

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

The purpose line is front-loaded, which is good, but the `view` block packs heavily nested parentheticals (e.g. 'empty ... with `path`, e.g. cache, only those') that require re-reading. Content mostly earns its place, but the structure is cramped.

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?

An output schema exists, so return values need not be explained (the field list is mildly redundant), and parameter meaning is well covered. The remaining gap is sibling disambiguation versus `history`/`purge_query_log` and an explicit read-only statement.

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?

Schema description coverage is 0%, so the description must compensate, and it largely does: it enumerates `view` modes, gives the enum-like values for `path` (fast | cache | llm | structured | entity | none), defines `since` as ISO 8601, and conveys `n` via 'recent (last n)'. Only the interaction between views and `path` is described densely rather than fully.

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?

The description states a specific resource (earlier questions / the query log) and enumerates the fields returned (interpretation, QuerySpec, SQL, result count, evidence ids, warnings, tokens, cost), so an agent can tell it inspects past query records. It stops short of differentiating itself from the sibling `history`, which likely covers overlapping ground.

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?

Each `view` value carries context on when to pick it (e.g. `empty` = 'answers that found nothing — check whether the reading was wrong', `diverging` = 'the same question pattern answered with different SQL'). This gives real selection guidance, but no explicit when-not or named alternative tool.

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