Skip to content

Looker MCP query_sql tool: support filter_expression parameter (to enable cross-field OR queries) #2974

@mkcuadros

Description

@mkcuadros

Prerequisites

What are you trying to do that currently feels hard or impossible?

This request is to expose filter_expression as an optional parameter in query-related Looker MCP tools.

The Looker MCP tools currently expose the filters map, which applies AND across fields and IN within a field; however, I don't believe there's a way to express cross-field OR through the current tool interface.

Example: "customers who listen to podcasts OR use iOS devices" requires ${media_type} = 'Podcast' OR ${product_os} = 'iOS', which can't be represented in the filters map.

(Contrast this to supported cases today for customers who listen to podcasts AND use iOS devices or customers who listen to podcasts OR Music)

Suggested Solution(s)

My understanding is that the Looker API's Query object supports a filter_expression string field that could be used for complex filter logic (cross-field OR, nested conditions).

Request: Add an optional filter_expression string parameter to query_sql Looker MCP tool (could be applied generally to all query tools - query, query_url, query_sql), mapping directly to the existing filter_expression field on the Looker API's Query object object.

Ref: https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/create_query (see filter_expression field)

Alternatives Considered

No response

Additional Details

No response

Metadata

Metadata

Assignees

Labels

type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions