Skip to content

feat(dataplex): improve dataplex params#2855

Merged
Yuan325 merged 8 commits intogoogleapis:mainfrom
sumedhdk22:improve-dataplex-params
Mar 26, 2026
Merged

feat(dataplex): improve dataplex params#2855
Yuan325 merged 8 commits intogoogleapis:mainfrom
sumedhdk22:improve-dataplex-params

Conversation

@sumedhdk22
Copy link
Copy Markdown
Contributor

Description

feat(dataplex): refine dataplex tools for better agent usability

Refines the parameters and descriptions for Dataplex tools to reduce redundancy
and improve tool selection accuracy for AI agents.

Key changes:

  • Removed the redundant 'name' parameter from 'lookup_entry' and 'lookup_context' tools.
  • Implemented automatic derivation of the parent resource path (project and location)
    from the 'entry' or 'resources' arguments.
  • Added validation logic to ensure provided resource names follow the correct format
    and that all resources in a batch request belong to the same project and location.
  • Enhanced tool and parameter descriptions across 'search_entries', 'lookup_entry',
    and 'lookup_context' to provide clearer instructions and search syntax examples.
  • Updated integration tests and YAML configurations to align with the new schema.

PR Checklist

Thank you for opening a Pull Request! Before submitting your PR, there are a
few things you can do to make sure it goes smoothly:

  • Make sure you reviewed
    CONTRIBUTING.md
  • Make sure to open an issue as a
    bug/issue
    before writing your code! That way we can discuss the change, evaluate
    designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Make sure to add ! if this involve a breaking change

🛠️ Fixes #<issue_number_goes_here>

Remove redundant name parameter and derive it from entry parameter.
Remove redundant name parameter and derive it from resources parameter.
This is done to make dataplex tool param descriptions more clear to the agents.
@sumedhdk22 sumedhdk22 requested review from a team as code owners March 26, 2026 14:35
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refines the Dataplex tools to enhance their usability and accuracy for AI agents. By removing redundant parameters, automating resource path derivation, and implementing robust input validation, the changes aim to make tool selection more precise and reduce potential errors. The improved descriptions also provide clearer guidance, ultimately leading to a more efficient and reliable interaction with Dataplex services.

Highlights

  • Parameter Simplification: The redundant 'name' parameter was removed from the 'lookup_entry' and 'lookup_context' tools, streamlining their usage.
  • Automatic Resource Path Derivation: The parent resource path (project and location) is now automatically derived from the 'entry' or 'resources' arguments, reducing manual input.
  • Input Validation: New validation logic was added to ensure resource names follow the correct format and that all resources in a batch request belong to the same project and location.
  • Enhanced Tool Descriptions: Tool and parameter descriptions for 'search_entries', 'lookup_entry', and 'lookup_context' were enhanced to provide clearer instructions and search syntax examples for AI agents.
  • Integration Test Updates: Integration tests and YAML configurations were updated to align with the new parameter schema and validation rules.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the Dataplex lookup_entry and lookup_context tools by removing the explicit name parameter, now deriving the project and location from the entry or resources fields. It introduces validation for resource name formats and ensures consistency across multiple resources for lookup_context. Tool and parameter descriptions were also updated for clarity. A review comment suggests improving error handling in dataplexlookupentry.go by immediately checking the error from parameters.ConvertAnySliceToTyped for better readability and adherence to the "fail fast" principle.

@estshy
Copy link
Copy Markdown
Contributor

estshy commented Mar 26, 2026

/gcbrun

@sumedhdk22 sumedhdk22 changed the title Improve dataplex params feat(dataplex): improve dataplex params Mar 26, 2026
@Yuan325
Copy link
Copy Markdown
Contributor

Yuan325 commented Mar 26, 2026

/gcbrun

@Yuan325
Copy link
Copy Markdown
Contributor

Yuan325 commented Mar 26, 2026

@sumedhdk22 seems like dataplex integration tests is failing~

@Yuan325
Copy link
Copy Markdown
Contributor

Yuan325 commented Mar 26, 2026

/gcbrun

@Yuan325
Copy link
Copy Markdown
Contributor

Yuan325 commented Mar 26, 2026

/gcbrun

@Yuan325 Yuan325 enabled auto-merge (squash) March 26, 2026 17:14
@Yuan325 Yuan325 merged commit 409a354 into googleapis:main Mar 26, 2026
15 checks passed
github-actions bot pushed a commit to pavankrishna13/genai-toolbox that referenced this pull request Mar 26, 2026
## Description

feat(dataplex): refine dataplex tools for better agent usability

Refines the parameters and descriptions for Dataplex tools to reduce
redundancy
and improve tool selection accuracy for AI agents.

Key changes:
- Removed the redundant 'name' parameter from 'lookup_entry' and
'lookup_context' tools.
- Implemented automatic derivation of the parent resource path (project
and location)
  from the 'entry' or 'resources' arguments.
- Added validation logic to ensure provided resource names follow the
correct format
and that all resources in a batch request belong to the same project and
location.
- Enhanced tool and parameter descriptions across 'search_entries',
'lookup_entry',
and 'lookup_context' to provide clearer instructions and search syntax
examples.
- Updated integration tests and YAML configurations to align with the
new schema.

## PR Checklist

> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [ ] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [ ] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
  before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] Make sure to add `!` if this involve a breaking change

🛠️ Fixes #<issue_number_goes_here> 409a354
github-actions bot pushed a commit to pavankrishna13/genai-toolbox that referenced this pull request Mar 26, 2026
## Description

feat(dataplex): refine dataplex tools for better agent usability

Refines the parameters and descriptions for Dataplex tools to reduce
redundancy
and improve tool selection accuracy for AI agents.

Key changes:
- Removed the redundant 'name' parameter from 'lookup_entry' and
'lookup_context' tools.
- Implemented automatic derivation of the parent resource path (project
and location)
  from the 'entry' or 'resources' arguments.
- Added validation logic to ensure provided resource names follow the
correct format
and that all resources in a batch request belong to the same project and
location.
- Enhanced tool and parameter descriptions across 'search_entries',
'lookup_entry',
and 'lookup_context' to provide clearer instructions and search syntax
examples.
- Updated integration tests and YAML configurations to align with the
new schema.

## PR Checklist

> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [ ] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [ ] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
  before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] Make sure to add `!` if this involve a breaking change

🛠️ Fixes #<issue_number_goes_here> 409a354
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants