-
Notifications
You must be signed in to change notification settings - Fork 244
Open
Description
Location: `frontend/src/pages/EnterpriseSettings.tsx` line ~1263–1292
Describe the bug
In Enterprise Settings → Tools → Add MCP Server, after testing a connection, the tool list is displayed with one "Import All" (`导入全部`) button per tool row. However:
- The button label says "Import All" but clicking it only imports the single tool on that row, not all tools.
- The "Import All" button is rendered inside a `.map()` loop, resulting in N identical-looking buttons for N tools — which is confusing and misleading.
Expected behavior
- Each tool row should have an "Import" button (imports that single tool)
- A single "Import All" button should appear outside the loop (below the tool list), which imports all discovered tools at once
Steps to reproduce
- Go to Enterprise Settings → Tools tab
- Click "+ Add MCP Server"
- Enter a valid MCP server URL and click "Test Connection"
- Observe that each tool row has a button labeled "Import All"
Code reference
// Line 1263 — button is inside .map(), but labeled "Import All"
{(mcpTestResult.tools || []).map((tool: any, i: number) => (
<div key={i} ...>
<span>{tool.name}</span>
<button onClick={/* imports only this one tool */}>
{t('enterprise.tools.importAll')} {/* ← misleading label */}
</button>
</div>
))}Suggested fix
- Rename the per-row button label to
t('enterprise.tools.import')(single tool import) - Add a new "Import All" button outside the `.map()` loop that iterates over all tools and calls `POST /api/tools` for each one

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels