Skip to content

how to use toolGoogleSearch and toolURLContext? #60

@smemsh

Description

@smemsh

If the GOOGLE_SEARCH and URL_CONTEXT features are enabled in rcfile, does user have to do something to use them? I could not find any docs and the patch looks like it just added the corresponding genai functions to the list of "tools" for the API calls, but then how to use these tools?

I'm guessing that, when enabled in rcfile, this is just following https://ai.google.dev/gemini-api/docs/google-search ? I noticed there was no use of groundingMetadata in the code, so my guess is, if enabled, the prompts will be submitted as candidates for grounding (Gemini will decide if they should be grounded, or dereference URLs in prompt and add to context), but responses won't be rendered specially to denote "grounded" portions of content (ie citations, etc). Is this a correct understanding?

Looks like, starting Jan 5, 2026, "Grounding" will have higher API costs than ungrounded. Since these costs could be significant, it might be good to have a run-time toggle (ie system command, or invocation option), as different instances of the cli might want to have a different config for this...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions