Skip to main content
Glama

run_query

Execute a saved Looker query by its ID, preserving all baked-in settings like dynamic fields and table calcs. Useful for re-running queries from dashboard tiles or other Looker tooling.

Instructions

Run an existing saved Looker Query by ID and return its results. Unlike query, this does not re-spec the query body — any settings baked into the saved Query (e.g. dynamic_fields / table calcs / vis config) are preserved. Useful for re-running a query whose ID you already have: a dashboard tile's query.id, the id returned by query_url, or an id surfaced by other Looker tooling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
query_idYesID of the saved Query
result_formatNoOutput format: 'json' (default), 'json_detail', 'csv', 'txt'json
limitNoRow limit override. Omit to use the limit baked into the saved Query.
apply_formattingNoRender values per LookML/Look formatting (currency symbols, date formats, etc.). Default false matches Looker's API default.
apply_visNoApply visualization-config-driven rendering to the result. Default false matches Looker's API default.
server_table_calcsNoCompute table calculations server-side so the response includes them. Required for tile-fidelity validation when the saved Query carries table calcs. Default false matches Looker's API default.
cacheNoAllow Looker to serve cached results. Set false to force a fresh run. Default true matches Looker's API default.
dev_modeNoResolve the Query against the dev workspace's LookML rather than production. Implied when ``branch`` is set.
branchNoProject branch to atomically swap to for this call (saved branch restored on exit). Requires project_id.
project_idNoLookML project ID owning the Query's model — required with ``branch``
act_as_userNoOptional Looker user ID or email to impersonate for this call. Use to operate on another user's dev workspace (Looker dev mode is per-user-isolated) or to run as a dedicated CI service user. Requires sudo capability on the configured admin credentials. When omitted, the call uses the configured or gateway-provided identity.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses key behaviors: preservation of saved Query settings, defaults matching Looker's API, and parameter effects (e.g., dev_mode, branch, act_as_user). However, it does not explicitly state that it is a read operation or discuss rate limits.

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

Conciseness5/5

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

The description is brief and well-structured: first sentence states purpose, second clarifies distinction, third lists use cases, and subsequent sentences detail parameters. No redundant information.

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?

Given 11 parameters, no annotations, and an output schema (not shown), the description covers key behavioral aspects and parameter details. It could mention that results are returned, but that is implied. Overall, it provides sufficient context for a complex tool.

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 100%, so baseline is 3. The description adds significant value beyond schema by explaining usage contexts (e.g., server_table_calcs for tile-fidelity, branch atomic swap, act_as_user for impersonation), justifying a higher score.

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?

The description clearly states the tool runs an existing saved Looker Query by ID and returns results. It distinguishes from sibling `query` by noting it preserves baked-in settings like dynamic_fields, providing a specific verb+resource with sibling differentiation.

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?

The description gives clear use cases (dashboard tile's query.id, id from query_url, etc.) and contrasts with `query`. While it lacks explicit 'when not to use', the context and sibling tools make the guidance effective.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ultrathink-Solutions/looker-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server