10 Commits

Author SHA1 Message Date
Yuan Teoh
3aae8097f1 refactor!: update repo name (#2968)
This update includes all the part with updating the `genai-toolbox` repo
name to `mcp-toolbox`, and the GCS buckets for binary.




Notes:
* For v1.0 release, binary will be available in both the existing and
the new bucket. After v1.0 release, we will update to only release in
the new bucket.
* Did not update releaseplease.yml's packageName to prevent breaking
release please
* Did not update user agent that consist of genai-toolbox string
* Will need to generate a new report card at goreportcard.com post name
change

---------

Co-authored-by: dishaprakash <57954147+dishaprakash@users.noreply.github.com>
2026-04-08 14:26:57 -07:00
Anubhav Dhawan
c3059c2335 feat(server): MCP endpoints API consolidation (#2829)
## Overview

This PR serves as the foundational layer that will eventually merge all
upcoming PRs for the new test harness and new MCP integration tests for
multiple databases.

**Before** | **After**
--- | ---
<img width="1133" height="1032" alt="image"
src="https://github.com/user-attachments/assets/4a4fe226-aea8-43d7-9c80-fbedf0ce2e5b"
/> | <img width="1323" height="1539" alt="image"
src="https://github.com/user-attachments/assets/75526df2-3351-4dd9-a3d7-f3e04d177d0e"
/>

## Strategy
While the legacy integration tests continue to run over the legacy
`/api` endpoints, we are introducing the new native MCP JSON-RPC harness
in parallel. This allows us to verify both pathways side-by-side without
breaking existing CI coverage.

To support this, we utilize the `--enable-api` flag to control whether
the server initializes the legacy API handlers or runs in MCP-only mode.
This ensures that the new tests can accurately verify the behavior of
the server when running in its final intended configuration.

## Changes
- Updates to `internal/server/server.go` to support dynamic execution
and flag-controlled initialization.
- Frontend files updated (`loadTools.js` and `runTool.js`) to streamline
how tools are loaded and invoked in the UI, aligning it with the
upcoming native MCP transition.

## Checklist
- [x] Ensure the tests and linter pass
- [x] Manually verified functionality of Toolbox UI

---------

Co-authored-by: Yuan Teoh <yuanteoh@google.com>
2026-03-31 16:07:26 +05:30
Yuan Teoh
ab64c9514a feat!: removing deprecations and update tools-file flag (#2806)
This PR includes the following:
* BREAKING CHANGE: Removing cloudsqlmssql support for ipAddress 
* BREAKING CHANGE: Removing support for authSources
* BREAKING CHANGE: Updating flat format config's `kind` value from
plural to singular
* Deprecating the `tools-file`, `tools-files`, and `tools-folder` flag
and adding new `config`, `configs`, and `config-folder` flag.

This is the main PR merging into main that includes previously approved
PRs.
2026-03-23 17:01:28 -07:00
Yuan Teoh
6943ab6839 fix(ui): remove module from script (#2703)
Removed `type="module"` from the script with DOM content.

Explanation of the chain of events that is happening currently:
* tools.html loads. It sees <script type="module"
src="/ui/js/tools.js"></script> and the inline <script type="module">
containing renderMainContent() call.
* Because both are modules, the browser waits until the HTML is fully
parsed, then executes them strictly in the order they appear in the
file.
* tools.js executes and attaches its DOMContentLoaded listener.
* The inline script executes and attaches its DOMContentLoaded listener.
* The DOM finishes loading. The browser fires the DOMContentLoaded
event.
* tools.js handles the event first. It runs the code on Line 27, looks
for tool-display-area, but it doesn't exist yet because the inline
script (which calls renderMainContent(...) to build that element) hasn't
run its event handler yet

Without the `type="module"`, it is now a standard script. The browser
will pause HTML parsing, executes the script immediately, and registers
the DOMContentLoaded listener first.

If we want to transition to using ES modules in the future, we will have
to rearrange the scripts. For now, modules is not necessary in this use
case. Hence defaulted to standard script.

Co-authored-by: Averi Kitsch <akitsch@google.com>
2026-03-11 18:27:09 +00:00
Benny Magid
276cf604a2 feat(ui): make tool list panel resizable (#2253)
## Description

Add draggable resize handle to tool list panel with min/max width
constraints, visual feedback, and localStorage persistence.

## 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 #1729

---------

Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
2026-02-18 15:07:40 -05:00
Mohammed Tanveer
d1358916d8 chore(ui): prevent script execution in Toolbox UI rendering (#2331)
# Defensive Security Hardening: Prevent Script Execution in Toolbox UI
Rendering

> **Note:** This issue was identified during security research and
reviewed previously.
> While typical deployments operate within a trusted configuration
model, addressing this behavior was recommended as a defense-in-depth
improvement. This PR describes the implemented fix.

## Overview

This change improves the safety of the GenAI Toolbox UI by preventing
unintended JavaScript execution when rendering values derived from tool
configuration files.

Previously, certain fields from tool definitions were rendered directly
into HTML contexts without escaping. As a result, tool definitions
containing embedded HTML or script payloads could trigger JavaScript
execution when viewed in the dashboard. While this occurs within the
same trust boundary as the configuration owner, escaping these values by
default avoids unexpected execution and improves robustness.

## Changes Implemented

### 1. New Utility
- Added `sanitize.js` which exports a strict `escapeHtml()` function.
- Escapes dangerous characters: `&`, `<`, `>`, `"`, `'`, `/`, `` ` ``.
- Performs strict type checking, rendering `null` and `undefined` values
as empty strings.

### 2. Input Handling
- Updated `internal/server/static/js/toolDisplay.js` to wrap `tool.name`
and `tool.description` with `escapeHtml()` prior to rendering them into
the DOM.

### 3. Error Handling
- Updated `internal/server/static/js/loadTools.js` to sanitize error
messages that may reflect user-controlled or derived input before
rendering.

## Validation

- Verified behavior using tool definition files containing common script
execution vectors.
- Confirmed that embedded HTML and script payloads are rendered as
literal text.
- Verified that standard and existing tool definitions continue to
render correctly without functional regression.

## Notes

This change is a defense-in-depth hardening measure.  
It does not modify the existing trust model or intended usage patterns,
but ensures safer default rendering behavior and avoids unintended
script execution in the UI.

## Attribution

**Contributor:** Mohammed Tanveer (threatpointer)

---------

Co-authored-by: threatpointer <mohammed.tanveer1@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
2026-01-29 00:22:24 +00:00
AlexTalreja
0820ae6881 chore(ui): logo redirects to homepage for Toolbox UI (#1112)
Clicking on the MCP Toolbox Logo will redirect to the Toolbox UI
Homepage.
2025-08-07 15:50:22 -07:00
AlexTalreja
37ae55648d feat: add instructions and links to docs in UI (#1100)
Add instructions on basic usage + links to the public documentation on
the main content area of the Homepage, Tools page, and Toolsets page.
2025-08-07 11:33:09 -07:00
AlexTalreja
d91bdfcbdc feat: add login with google button for automatic id token retrieval (#1044)
Add `Sign in with Google` button within Toolbox UI's `Edit Header` modal
that automatically retrieves a valid ID token for users based on an
input clientID.

This should make it significantly easier/faster for users to format
request headers properly and test tools that use auth.
2025-08-05 15:55:28 -07:00
AlexTalreja
8749b03003 feat: interactive web UI for Toolbox (#1065)
Introduce Toolbox UI, which can be launched with the `--ui` flag. 

This initial version of Toolbox UI allows users to test Toolbox by
inspecting tools/toolsets, modifying parameters, managing headers, and
executing API calls.
2025-08-04 11:47:38 -07:00