Skip to main content
Glama

Query Substrate

query_substrate
Read-onlyIdempotent

Set fresh=true for a user-requested saved-view update: execute without the result cache; all access and scan limits still apply. Run a read-only SQL SELECT directly over the Vlada cost-data substrate (Athena/Iceberg) and get the rows back, with provenance. Use this when the pre-built tools don't answer your exact question. WORKFLOW: first call find_data_sources / describe_data_source to find the table + read its card (grain, columns, and the CAVEATS you must apply — e.g. filter ghost rates, never blend across modifiers/methodologies), THEN write SQL against the table's fully-qualified name (e.g. vlada_curated.fact_hospital_chargemaster). RULES: read-only SELECT only (no INSERT/UPDATE/DDL — rejected); you may only query tables in the queryable set your account is entitled to (others are rejected); M-2 versioned tables must be filtered on is_current (injected for a single-table SELECT, otherwise rejected with the column named); results are LIMIT-bounded by your plan's per-call row cap (at most 10000), the delivered payload is bounded to ~47K chars, and the scan is cost-capped. Any bound that drops rows is reported as truncated:true with rows_returned + rows_dropped/total_rows_estimate and a caveat saying how to get the rest: aggregate in SQL (GROUP BY, COUNT, approx_percentile) or narrow the predicate, so the engine computes over the full set and returns the answer in a few rows. Vlada answers questions; it does not export whole tables: paging past the first page (OFFSET) and the async lane (submit_query) come with the Enterprise plan. Every result carries provenance (the engine, query id, bytes scanned, tables read). Apply the source card's methodology yourself: raw SQL does not enforce it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
freshNo
max_rowsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitNo
as_ofNo
valueNo
sourceNo
statusNocomplete
caveatsNo
failureNo
qualityNo
refusalNo
vintageNo
explanationNo
methodologyNo
tool_versionNounknown
response_hashNo
freshness_stateNounknown
semantic_versionNo
invariants_appliedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources