Add the get_resource_metadata tool and remove resource metadata from …#37
Merged
Add the get_resource_metadata tool and remove resource metadata from …#37
Conversation
…the search tool description Change-Id: I29ce75700465667873d43fdb434977eddba60de2
BenRKarl
approved these changes
Mar 23, 2026
|
|
||
| # The Google Ads Field Service supports LIKE operator natively. | ||
| # This filter ensures we only get rows that belong to the queried resource. | ||
| query = f"SELECT name, selectable, filterable, sortable WHERE name LIKE '{resource_name}.%'" |
There was a problem hiding this comment.
Is the .% intentional? Is that a wildcard for the resource name?
Collaborator
Author
There was a problem hiding this comment.
It is intentional, because it's a query to retrieve all fields inside a resource.
So for instance if resource_name is campaign, we want to retrieve campaign.resource_name, campaign.id, campaign.name etc.
…etadata responses Change-Id: Idc74b0c45e9f708cee0cb611f319e5478c9602fb
Change-Id: Icfdc37360a055396910704d432adab097fc557a0
Change-Id: Ifac88f8f20ea7daccc0717cd882251f8651ed91c
This was referenced Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…the search tool description
Fixes #15.
This PR includes the following changes:
get_resource_metadatatool to retrieve resource metadata using the GoogleAdsFieldService and its own test,get_resource_metadata_testgaql_resources.jsonand only keep the names of available resourcesChangegaql_resources.json` to a .txt file since it now only has a flat list of resource namessearchtool to clarify that resource metadata is to be retrieved with theget_resource_metadatatoolget_resource_metadata