Skip to main content
Glama

Query a saved blend

query_blend
Read-only

Run a saved blend by id and return its rows.

The blend already holds its account set. By default it projects the blend's saved metrics + dimensions; pass fields (names from list_fields) to project a specific subset. Supply the time window (date_range — preset or {"from", "to"}), optional filters (operators eq|neq|gt|gte|lt|lte|contains|ncontains|in|null|notnull), and an optional limit. Discover blend ids with list_blends. Returns the same {columns, rows, row_count, truncated} shape as query_data, and pages the same way: limit is the page size, and a next_cursor is read by calling again with the same arguments plus cursor. If a blend errors because its schema is not warmed, call update_blend(blend_id, refresh_schema=true) and retry. A blend is the slowest kind of query, so it is the likeliest to come back as {"status": "running", "query_id": …} — that is not an error: collect it with get_query_result(query_id=…), calling again immediately while it says running, and never by re-issuing this call. Read-only.

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": {
      "blend_id": "<blend_id>"
    },
    "name": "query_blend"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
cursorNo
fieldsNo
filtersNo
blend_idYes
date_rangeNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and destructiveHint=false, yet the description adds the non-obvious traits: the blend carries its own account set, default projection is the saved metrics+dimensions, and blends are the slowest query type so they are likeliest to return an async {"status":"running"} envelope. The final "Read-only" restates the annotation, but the surrounding disclosure is far beyond it.

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: projection, inputs, discovery, return shape, paging, error recovery, async handling. Dense but every clause carries operational information. It is a long run-on block with no visual separation, and the trailing "Read-only" duplicates the annotation, so slightly short of ideal.

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?

For a 6-parameter, async-capable, read-only query tool this covers everything an agent needs: how to get a valid id, how to shape the projection, how paging composes, how errors surface, and how the running state resolves. An output schema exists, and the description still names the return shape and truncation flag, so return-value explanation is not a gap.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does: it defines the date_range as a preset or a {"from","to"} object, enumerates the filter operators inline, explains that limit is a page size rather than a cap, and specifies that continuation is the same arguments plus cursor. It also gives field-name provenance via list_fields.

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?

"Run a saved blend by id and return its rows" gives a specific verb (run), resource (saved blend), keying parameter (id), and output (rows). It implicitly separates itself from query_data and get_blend by tying execution to a saved blend definition rather than a raw query.

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?

Explicit routing is provided at multiple branch points: use list_blends to discover ids, list_fields to source field names, update_blend(refresh_schema=true) on a schema-warming error, and get_query_result for the running case. It also states what NOT to do ("never by re-issuing this call"), which is the highest-value exclusion an agent could get wrong.

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