Custom tool not handling params with BigQuery resource

Hey there.

When creating a custom tool I have set a parameter that connects directly to a bigquery resource with a SQL code that should read from the param, but nothing is returning.

This doesn't work:

This works:

But this doesn't again: