query
Run analytical queries against Looker's semantic model by specifying model, explore, fields, filters, and sorts. Looker generates optimized SQL and returns JSON data rows.
Instructions
Run a query using the Looker semantic model. Specify the model, explore, fields, filters, and sorts. Looker generates the optimized SQL — you never write SQL directly. Returns data rows as JSON.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | LookML model name (e.g. 'ecommerce') | |
| view | Yes | Explore/view name within the model (e.g. 'orders') | |
| fields | Yes | Fields to select — use fully-qualified names (e.g. ['orders.region', 'orders.total_revenue']) | |
| filters | No | Filter expressions as field:value pairs (e.g. {'orders.created_date': '90 days'}) | |
| sorts | No | Sort expressions (e.g. ['orders.total_revenue desc']) | |
| limit | No | Maximum rows to return | |
| result_format | No | Output format: 'json' (default), 'json_detail', 'csv', 'txt' | json |
| dev_mode | No | Run against the dev workspace's currently-checked-out LookML rather than production. Required when validating in-progress branch edits. Implied automatically when ``branch`` is set. | |
| branch | No | Project branch to atomically swap to for this call. The dev workspace's saved branch is restored when the call completes (success or failure). Implies dev_mode=True; requires project_id. | |
| project_id | No | LookML project ID — required when ``branch`` is set so the MCP knows which project's branch state to swap. | |
| act_as_user | No | Optional 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
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |