Skip to main content
Glama

get_signed_sql_drilldown

Read-only

Fetch the rows behind an event-web drilldown from its server-minted query token.

Some web nodes from `situate(symbols=[...])` carry `signed_query_url` in their `fetch` hint —
an opaque, tamper-proof link the backend minted for exactly that node. This tool is
the zero-planning rung of the chain: no query to compose, the rows come back
directly. Pass either the full `signed_query_url` or just its `t` parameter; the
URL form is unwrapped automatically. A token that came from a
SAVED request rather than the event web belongs to `run_saved_query` instead — same
endpoint, but it replays every query in the saved row in one call.

Returns {"format": "table", "count": N, "rows": [...]} — rows only, never the
underlying SQL. For contextual drilldowns the NEW record is flagged
`is_new_record: true` and the remaining rows are the prior/context records to read
it against (the node's `signed_query_context` describes what they are).

CITE WHAT YOU PUBLISH: the rows may carry `_source_*` columns — `_source_url`,
`_source_filed_at`, `_source_document_id`, `_source_citations` — and the response a
`sources` block naming each relation, its grain, and whether it is `traceable` per
"row" or only as a "cohort". That is the provenance of the numbers, not padding:
quote `_source_url` when the user asks where a figure came from, and for anything
you are about to publish — or the moment they ask for the filing, the quote, or
"how do you know" — pass `sources.relations[].relation` plus each row's
identifying columns (the grain AND its date) to `trace_data_sources`, which
resolves them to the source document, the
section, or the verified quote behind the number. `get_document_section` then opens
the exact speaker turn a transcript citation points at.

HTTP 403 means the token is invalid or tampered — do not retry with an altered
token; re-run situate for a fresh link instead.

`values` and `prompt` re-aim a token that is a PLACEHOLDER TWIN at other entities;
the response then carries `parameters` (what was substituted) alongside `rows`;
echo those to the user. A 422 means the request could not be
mapped onto the token's slots. The full slot vocabulary of a SAVED row lives in
`list_saved_queries` -> `metadata.parameters`, and replaying a saved row is
`run_saved_query`, not this tool.

An uncapped drilldown that fans out to constituents can return tens of thousands
of rows and stall the client for minutes — pass `max_rows`.

Requires auth (your MCP client attaches the OAuth bearer automatically). A
not-authenticated error means the sign-in lapsed; the fix is signing in, never a
different token.

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": {
      "encrypted_query_token": "<encrypted_query_token>"
    },
    "name": "get_signed_sql_drilldown"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptNoPlaceholder-twin tokens only: natural-language fill for slots `values` did not cover, e.g. "the same rows for KSS". Omit for a plain event-web link.
valuesNoPlaceholder-twin tokens only (preferred over prompt): {slot name: typed value}, filled deterministically, e.g. {"symbol": "KSS"}. Omit for a plain link.
max_rowsNoCap on rows returned, e.g. 500; the response then carries row_count and truncated: true. Pass it on any drilldown that can fan out to constituents.
encrypted_query_tokenYesA situate web node's `signed_query_url`, or just its `t` parameter — verbatim. Never construct or edit one; never pass SQL.

Output Schema

NameRequiredDescriptionDefault
rowsNoResult rows (cell values are strings or null). May carry _source_* citation columns. Null on a replay entry whose token failed (see `error`).
countNoRows returned in `rows`.
formatNo"table".
sourcesNoProvenance block; present when the numbers trace to documents.
row_countNoFull row count when `truncated` (max_rows sliced the result).
truncatedNo
parametersNoValues substituted into a placeholder twin; echo them to the user.
ignored_valuesNoKeys in `values` this token does not use.
defaulted_parametersNoSlots that kept the saved example value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / encrypted_query_token / description
      Previous value: -"A node's `signed_query_url` from get_company_event_web, or just its `t` parameter — verbatim. Never construct or edit one; never pass SQL."New value: +"A situate web node's `signed_query_url`, or just its `t` parameter — verbatim. Never construct or edit one; never pass SQL."
  2. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, and the description adds substantial context beyond that: HTTP 403/422 semantics, the OAuth requirement and that a not-authenticated error means re-signing in, the fan-out stall risk motivating max_rows, and the exact response shape including the sources block. However, much of this is return-value and error-handling detail rather than new behavioral traits, so it lands at a solid 3 rather than the top of the scale.

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, then layered from link-shape to errors to provenance to parameter edge cases. It is long and drifts into promotional prose ('not padding', 'CITE WHAT YOU PUBLISH'), and the saved-query contrast is restated twice, which keeps it off a 5.

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

Completeness5/5

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

Covers the full operational surface: accepted token forms, token provenance, error codes, auth recovery, row-count caps, the new-record flag for contextual drilldowns, and the sources block for citation. Even though an output schema exists, the inline explanation of rows/sources/parameters is what an agent needs to act correctly.

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 coverage is 100%, so the baseline is 3. The description nonetheless adds meaning the schema lacks: values and prompt only apply to PLACEHOLDER TWIN tokens, and the response then carries a parameters block that must be echoed to the user. It also explains max_rows' consequence (truncation) in operational terms.

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?

Opens with a specific verb and resource — fetching rows behind an event-web drilldown via a server-minted token — and immediately frames it as the 'zero-planning rung' distinct from composing a query. It explicitly differentiates from the closest sibling, run_saved_query, so an agent can route without opening either 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?

Gives explicit when-to-use (node has signed_query_url in its fetch hint), when-not (token from a SAVED request belongs to run_saved_query), and a downstream chain (trace_data_sources, then get_document_section). Also states the bad-path behavior: 403 means don't retry with an altered token, re-run situate instead.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources