name: validate-gaql description: Validates Google Ads Query Language (GAQL) queries via 4-step static analysis and live API dry-runs. metadata: version: "1.0.0"
Validate GAQL Skill
Before presenting or running any GAQL query, pass this 4-step sequence:
- Schema Discovery: Verify field existence, selectability, and filterability using
search_google_ads_fields. - Compatibility Check: Verify all selected fields are compatible with the primary resource.
- Static Analysis:
WHERE fields MUST be in SELECT (unless date segments).- NO `OR` operator: Replace
OR with IN or split into multiple queries. - NO `FROM` in Metadata: Queries to
GoogleAdsFieldService MUST NOT contain a FROM clause. - Segment Renames: In v23+,
segments.hour was renamed to segments.hour_of_day.
- Runtime Dry Run: Execute API dry-run search request against target customer ID.