mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-01-13 17:38:10 -05:00
Compare commits
3 Commits
registry-t
...
guide
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92a22de07c | ||
|
|
9a515a8792 | ||
|
|
e255808714 |
@@ -59,6 +59,13 @@ You can manually trigger the bot by commenting on your Pull Request:
|
||||
* `/gemini summary`: Posts a summary of the changes in the pull request.
|
||||
* `/gemini help`: Overview of the available commands
|
||||
|
||||
## Guidelines for Pull Requests
|
||||
|
||||
1. Please keep your PR small for more thorough review and easier updates. In case of regression, it also allows us to roll back a single feature instead of multiple ones.
|
||||
1. For non-trivial changes, consider opening an issue and discussing it with the code owners first.
|
||||
1. Provide a good PR description as a record of what change is being made and why it was made. Link to a GitHub issue if it exists.
|
||||
1. Make sure your code is thoroughly tested with unit tests and integration tests. Remember to clean up the test instances properly in your code to avoid memory leaks.
|
||||
|
||||
## Adding a New Database Source or Tool
|
||||
|
||||
Please create an
|
||||
@@ -110,6 +117,8 @@ implementation](https://github.com/googleapis/genai-toolbox/blob/main/internal/s
|
||||
We recommend looking at an [example tool
|
||||
implementation](https://github.com/googleapis/genai-toolbox/tree/main/internal/tools/postgres/postgressql).
|
||||
|
||||
Remember to keep your PRs small. For example, if you are contributing a new Source, only include one or two core Tools within the same PR, the rest of the Tools can come in subsequent PRs.
|
||||
|
||||
* **Create a new directory** under `internal/tools` for your tool type (e.g., `internal/tools/newdb/newdbtool`).
|
||||
* **Define a configuration struct** for your tool in a file named `newdbtool.go`.
|
||||
Create a `Config` struct and a `Tool` struct to store necessary parameters for
|
||||
@@ -163,6 +172,8 @@ tools.
|
||||
parameters][temp-param-doc]. Only run this test if template
|
||||
parameters apply to your tool.
|
||||
|
||||
* **Add additional tests** for the tools that are not covered by the predefined tests. Every tool must be tested!
|
||||
|
||||
* **Add the new database to the integration test workflow** in
|
||||
[integration.cloudbuild.yaml](.ci/integration.cloudbuild.yaml).
|
||||
|
||||
@@ -179,6 +190,7 @@ tools.
|
||||
[temp-param-doc]:
|
||||
https://googleapis.github.io/genai-toolbox/resources/tools/#template-parameters
|
||||
|
||||
|
||||
### Adding Documentation
|
||||
|
||||
* **Update the documentation** to include information about your new data source
|
||||
|
||||
88
server.json
88
server.json
@@ -31,18 +31,6 @@
|
||||
"default": "tools.yaml",
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--tools-files",
|
||||
"description": "Multiple file paths specifying tool configurations. Files will be merged. Cannot be used with –-tools-file or –-tools-folder.",
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--tools-folder",
|
||||
"description": "Directory path containing YAML tool configuration files. All .yaml and .yml files in the directory will be loaded and merged. Cannot be used with –-tools-file or –-tools-files.",
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--address",
|
||||
@@ -82,82 +70,6 @@
|
||||
"warn",
|
||||
"error"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--logging-format",
|
||||
"description": "Specify logging format to use.",
|
||||
"default": "standard",
|
||||
"choices": [
|
||||
"standard",
|
||||
"json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--disable-reload",
|
||||
"description": "Disables dynamic reloading of tools file.",
|
||||
"format": "boolean",
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--prebuilt",
|
||||
"description": "Use a prebuilt tool configuration by source type.",
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--stdio",
|
||||
"description": "Listens via MCP STDIO instead of acting as a remote HTTP server.",
|
||||
"format": "boolean",
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--telemetry-gcp",
|
||||
"description": "Enable exporting directly to Google Cloud Monitoring.",
|
||||
"format": "boolean",
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--telemetry-otlp",
|
||||
"description": "Enable exporting using OpenTelemetry Protocol (OTLP) to the specified endpoint (e.g. 'http://127.0.0.1:4318').",
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--telemetry-service-name",
|
||||
"description": "Sets the value of the service.name resource attribute for telemetry data.",
|
||||
"default": "toolbox",
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--ui",
|
||||
"description": "Launches the Toolbox UI web server.",
|
||||
"format": "boolean",
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--allowed-origins",
|
||||
"description": "Specifies a list of origins permitted to access this server.",
|
||||
"default": "*",
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--help",
|
||||
"description": "Show help for toolbox",
|
||||
"isRequired": false
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--version",
|
||||
"description": "Show version for toolbox",
|
||||
"isRequired": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user