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
Prerequisites
What are you trying to do that currently feels hard or impossible?
This request is to expose
filter_expressionas an optional parameter in query-related Looker MCP tools.The Looker MCP tools currently expose the
filtersmap, 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_expressionstring field that could be used for complex filter logic (cross-field OR, nested conditions).Request: Add an optional
filter_expressionstring parameter toquery_sqlLooker MCP tool (could be applied generally to all query tools -query,query_url,query_sql), mapping directly to the existingfilter_expressionfield 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