diff --git a/packages/types/src/__tests__/global-settings.test.ts b/packages/types/src/__tests__/global-settings.test.ts index 8107053333..07c8ff6ee8 100644 --- a/packages/types/src/__tests__/global-settings.test.ts +++ b/packages/types/src/__tests__/global-settings.test.ts @@ -1,5 +1,6 @@ import { DEFAULT_DESTRUCTIVE_COMMAND_GUARD_ENABLED, + DEFAULT_SHOW_MCP_DESCRIPTIONS, GLOBAL_SETTINGS_KEYS, globalSettingsSchema, } from "../global-settings.js" @@ -20,3 +21,20 @@ describe("destructive command guard global setting", () => { expect(() => globalSettingsSchema.parse({ destructiveCommandGuardEnabled: "true" })).toThrow() }) }) + +describe("MCP description visibility global setting", () => { + it("preserves existing description visibility by default", () => { + expect(DEFAULT_SHOW_MCP_DESCRIPTIONS).toBe(true) + }) + + it("accepts and exposes the persisted setting", () => { + expect(globalSettingsSchema.parse({ showMcpDescriptions: false })).toEqual({ + showMcpDescriptions: false, + }) + expect(GLOBAL_SETTINGS_KEYS).toContain("showMcpDescriptions") + }) + + it("rejects non-boolean setting values", () => { + expect(() => globalSettingsSchema.parse({ showMcpDescriptions: "false" })).toThrow() + }) +}) diff --git a/packages/types/src/global-settings.ts b/packages/types/src/global-settings.ts index 95f246dbe7..b53e9a0494 100644 --- a/packages/types/src/global-settings.ts +++ b/packages/types/src/global-settings.ts @@ -99,6 +99,11 @@ export const MAX_CHECKPOINT_TIMEOUT_SECONDS = 60 */ export const DEFAULT_CHECKPOINT_TIMEOUT_SECONDS = 15 +/** + * Whether MCP-supplied tool and resource descriptions are shown in the UI. + */ +export const DEFAULT_SHOW_MCP_DESCRIPTIONS = true + /** * GlobalSettings */ @@ -241,6 +246,11 @@ export const globalSettingsSchema = z.object({ telemetrySetting: telemetrySettingsSchema.optional(), mcpEnabled: z.boolean().optional(), + /** + * Whether MCP-supplied tool and resource descriptions are shown in the UI. + * @default true + */ + showMcpDescriptions: z.boolean().optional(), mode: z.string().optional(), modeApiConfigs: z.record(z.string(), z.string()).optional(), diff --git a/packages/types/src/vscode-extension-host.ts b/packages/types/src/vscode-extension-host.ts index 5f6b579779..9d10195d39 100644 --- a/packages/types/src/vscode-extension-host.ts +++ b/packages/types/src/vscode-extension-host.ts @@ -328,6 +328,7 @@ export type ExtensionState = Pick< | "includeCurrentCost" | "maxGitStatusFiles" | "requestDelaySeconds" + | "showMcpDescriptions" | "showWorktreesInHomeScreen" | "disabledTools" > & { diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index b0237c8aa5..974d96c031 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -46,6 +46,7 @@ import { DEFAULT_WRITE_DELAY_MS, DEFAULT_DIFF_FUZZY_THRESHOLD, DEFAULT_DESTRUCTIVE_COMMAND_GUARD_ENABLED, + DEFAULT_SHOW_MCP_DESCRIPTIONS, DEFAULT_AUTO_CLOSE_ZOO_OPENED_FILES, DEFAULT_AUTO_CLOSE_ZOO_OPENED_FILES_AFTER_USER_EDITED, DEFAULT_AUTO_CLOSE_ZOO_OPENED_NEW_FILES, @@ -2604,6 +2605,7 @@ export class ClineProvider terminalZdotdir, terminalProfile, mcpEnabled, + showMcpDescriptions, currentApiConfigName, listApiConfigMeta, pinnedApiConfigs, @@ -2767,6 +2769,7 @@ export class ClineProvider terminalZdotdir: terminalZdotdir ?? false, terminalProfile, mcpEnabled: mcpEnabled ?? true, + showMcpDescriptions: showMcpDescriptions ?? DEFAULT_SHOW_MCP_DESCRIPTIONS, currentApiConfigName: currentApiConfigName ?? "default", listApiConfigMeta: listApiConfigMeta ?? [], pinnedApiConfigs: pinnedApiConfigs ?? {}, @@ -3003,6 +3006,7 @@ export class ClineProvider mode: stateValues.mode ?? defaultModeSlug, language: stateValues.language ?? formatLanguage(vscode.env.language), mcpEnabled: stateValues.mcpEnabled ?? true, + showMcpDescriptions: stateValues.showMcpDescriptions ?? DEFAULT_SHOW_MCP_DESCRIPTIONS, mcpServers: this.mcpHub?.getAllServers() ?? [], currentApiConfigName: stateValues.currentApiConfigName ?? "default", listApiConfigMeta: stateValues.listApiConfigMeta ?? [], diff --git a/src/core/webview/__tests__/ClineProvider.spec.ts b/src/core/webview/__tests__/ClineProvider.spec.ts index ad6ea143a8..363b17bf6f 100644 --- a/src/core/webview/__tests__/ClineProvider.spec.ts +++ b/src/core/webview/__tests__/ClineProvider.spec.ts @@ -16,6 +16,7 @@ import { ORGANIZATION_ALLOW_ALL, DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, DEFAULT_DIFF_FUZZY_THRESHOLD, + DEFAULT_SHOW_MCP_DESCRIPTIONS, DEFAULT_WRITE_DELAY_MS, providerIdentifiers, } from "@roo-code/types" @@ -1352,6 +1353,27 @@ describe("ClineProvider", () => { expect(postedState.apiConfiguration).toMatchObject(expectedConfiguration) }) + it.each([true, false])("returns a saved MCP description visibility value of %s", async (value) => { + await provider.resolveWebviewView(mockWebviewView) + await provider.contextProxy.setValue("showMcpDescriptions", value) + + const state = await provider.getState() + const postedState = await provider.getStateToPostToWebview() + + expect(state.showMcpDescriptions).toBe(value) + expect(postedState.showMcpDescriptions).toBe(value) + }) + + test("shows MCP descriptions by default in runtime and posted state", async () => { + await provider.resolveWebviewView(mockWebviewView) + + const state = await provider.getState() + const postedState = await provider.getStateToPostToWebview() + + expect(state.showMcpDescriptions).toBe(DEFAULT_SHOW_MCP_DESCRIPTIONS) + expect(postedState.showMcpDescriptions).toBe(DEFAULT_SHOW_MCP_DESCRIPTIONS) + }) + test("getState returns the saved destructive command guard setting", async () => { await provider.contextProxy.setValue("destructiveCommandGuardEnabled", true) diff --git a/src/core/webview/__tests__/webviewMessageHandler.spec.ts b/src/core/webview/__tests__/webviewMessageHandler.spec.ts index 4c2a301965..6e55099554 100644 --- a/src/core/webview/__tests__/webviewMessageHandler.spec.ts +++ b/src/core/webview/__tests__/webviewMessageHandler.spec.ts @@ -1240,6 +1240,20 @@ describe("webviewMessageHandler - mcpEnabled", () => { }) }) +describe("webviewMessageHandler - showMcpDescriptions", () => { + it.each([true, false])("persists %s through the generic settings path", async (value) => { + vi.clearAllMocks() + + await webviewMessageHandler(mockClineProvider, { + type: "updateSettings", + updatedSettings: { showMcpDescriptions: value }, + }) + + expect(mockClineProvider.contextProxy.setValue).toHaveBeenCalledWith("showMcpDescriptions", value) + expect(mockClineProvider.postStateToWebview).toHaveBeenCalledTimes(1) + }) +}) + describe("webviewMessageHandler - destructiveCommandGuardEnabled", () => { beforeEach(() => { vi.clearAllMocks() diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index 952322084f..071c0e94dd 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -190,6 +190,7 @@ export const ChatRowContent = ({ const { mcpServers, alwaysAllowMcp, + showMcpDescriptions, currentCheckpoint, mode, apiConfiguration, @@ -1661,6 +1662,7 @@ export const ChatRowContent = ({ // Always use the actual URI from the request uri: useMcpServer.uri || "", }} + showDescription={showMcpDescriptions} /> )} {useMcpServer.type === "use_mcp_tool" && ( @@ -1673,6 +1675,7 @@ export const ChatRowContent = ({ server={server} useMcpServer={useMcpServer} alwaysAllowMcp={alwaysAllowMcp} + showMcpDescriptions={showMcpDescriptions} /> )} diff --git a/webview-ui/src/components/chat/McpExecution.tsx b/webview-ui/src/components/chat/McpExecution.tsx index 9e48552fdc..d1fda9389d 100644 --- a/webview-ui/src/components/chat/McpExecution.tsx +++ b/webview-ui/src/components/chat/McpExecution.tsx @@ -36,6 +36,7 @@ interface McpExecutionProps { } useMcpServer?: ClineAskUseMcpServer alwaysAllowMcp?: boolean + showMcpDescriptions?: boolean } export const McpExecution = ({ @@ -47,6 +48,7 @@ export const McpExecution = ({ server, useMcpServer, alwaysAllowMcp = false, + showMcpDescriptions = true, }: McpExecutionProps) => { const { t } = useTranslation("mcp") @@ -251,6 +253,7 @@ export const McpExecution = ({ serverSource={server?.source} alwaysAllowMcp={alwaysAllowMcp} isInChatContext={true} + showDescription={showMcpDescriptions} /> )} @@ -266,6 +269,7 @@ export const McpExecution = ({ serverSource={undefined} alwaysAllowMcp={alwaysAllowMcp} isInChatContext={true} + showDescription={showMcpDescriptions} /> )} diff --git a/webview-ui/src/components/mcp/McpResourceRow.tsx b/webview-ui/src/components/mcp/McpResourceRow.tsx index 2c48bad723..29211b2ac2 100644 --- a/webview-ui/src/components/mcp/McpResourceRow.tsx +++ b/webview-ui/src/components/mcp/McpResourceRow.tsx @@ -2,9 +2,10 @@ import type { McpResource, McpResourceTemplate } from "@roo-code/types" type McpResourceRowProps = { item: McpResource | McpResourceTemplate + showDescription?: boolean } -const McpResourceRow = ({ item }: McpResourceRowProps) => { +const McpResourceRow = ({ item, showDescription = true }: McpResourceRowProps) => { const hasUri = "uri" in item const uri = hasUri ? item.uri : item.uriTemplate @@ -23,20 +24,22 @@ const McpResourceRow = ({ item }: McpResourceRowProps) => { {uri} -
- {item.name && item.description - ? `${item.name}: ${item.description}` - : !item.name && item.description - ? item.description - : !item.description && item.name - ? item.name - : "No description"} -
+ {(item.name || showDescription) && ( +
+ {item.name && showDescription && item.description + ? `${item.name}: ${item.description}` + : !item.name && showDescription && item.description + ? item.description + : item.name + ? item.name + : "No description"} +
+ )}
{ +const McpToolRow = ({ + tool, + serverName, + serverSource, + alwaysAllowMcp, + isInChatContext = false, + showDescription = true, +}: McpToolRowProps) => { const { t } = useAppTranslation() const isToolEnabled = tool.enabledForPrompt ?? true @@ -95,7 +103,7 @@ const McpToolRow = ({ tool, serverName, serverSource, alwaysAllowMcp, isInChatCo
)} - {tool.description && ( + {showDescription && tool.description && (
{tool.description}
)} {isToolEnabled && diff --git a/webview-ui/src/components/mcp/McpView.tsx b/webview-ui/src/components/mcp/McpView.tsx index 72724d72e8..d4d6832394 100644 --- a/webview-ui/src/components/mcp/McpView.tsx +++ b/webview-ui/src/components/mcp/McpView.tsx @@ -1,8 +1,14 @@ import React, { useState } from "react" import { Trans } from "react-i18next" -import { VSCodeLink, VSCodePanels, VSCodePanelTab, VSCodePanelView } from "@vscode/webview-ui-toolkit/react" +import { + VSCodeCheckbox, + VSCodeLink, + VSCodePanels, + VSCodePanelTab, + VSCodePanelView, +} from "@vscode/webview-ui-toolkit/react" -import type { McpServer } from "@roo-code/types" +import { DEFAULT_SHOW_MCP_DESCRIPTIONS, type McpServer } from "@roo-code/types" import { vscode } from "@src/utils/vscode" import { useExtensionState } from "@src/context/ExtensionStateContext" @@ -31,14 +37,27 @@ import { McpErrorRow } from "./McpErrorRow" interface McpViewProps { mcpEnabled?: boolean setMcpEnabled?: (value: boolean) => void + showMcpDescriptions?: boolean + setShowMcpDescriptions?: (value: boolean) => void } -const McpView = ({ mcpEnabled: propsMcpEnabled, setMcpEnabled }: McpViewProps = {}) => { - const { mcpServers: servers, alwaysAllowMcp, mcpEnabled: contextMcpEnabled } = useExtensionState() +const McpView = ({ + mcpEnabled: propsMcpEnabled, + setMcpEnabled, + showMcpDescriptions: propsShowMcpDescriptions, + setShowMcpDescriptions, +}: McpViewProps = {}) => { + const { + mcpServers: servers, + alwaysAllowMcp, + mcpEnabled: contextMcpEnabled, + showMcpDescriptions: contextShowMcpDescriptions, + } = useExtensionState() // When rendered inside SettingsView the value is buffered in `cachedState` and // only persisted on Save. Fall back to live extension state when used uncontrolled. const mcpEnabled = propsMcpEnabled ?? contextMcpEnabled + const showMcpDescriptions = propsShowMcpDescriptions ?? contextShowMcpDescriptions ?? DEFAULT_SHOW_MCP_DESCRIPTIONS const { t } = useAppTranslation() const { isOverThreshold, title, message } = useTooManyTools() @@ -66,6 +85,27 @@ const McpView = ({ mcpEnabled: propsMcpEnabled, setMcpEnabled }: McpViewProps = + {mcpEnabled && ( +
+ { + const target = event.target as HTMLInputElement + setShowMcpDescriptions?.(target.checked) + }}> + {t("mcp:showDescriptions.title")} + +

+ {t("mcp:showDescriptions.description")} +

+
+ )} + {mcpEnabled && ( <> {/* Too Many Tools Warning */} @@ -101,6 +141,7 @@ const McpView = ({ mcpEnabled: propsMcpEnabled, setMcpEnabled }: McpViewProps = key={`${server.name}-${server.source || "global"}`} server={server} alwaysAllowMcp={alwaysAllowMcp} + showMcpDescriptions={showMcpDescriptions} /> ))} @@ -183,7 +224,15 @@ const McpView = ({ mcpEnabled: propsMcpEnabled, setMcpEnabled }: McpViewProps = ) } -const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowMcp?: boolean }) => { +const ServerRow = ({ + server, + alwaysAllowMcp, + showMcpDescriptions, +}: { + server: McpServer + alwaysAllowMcp?: boolean + showMcpDescriptions: boolean +}) => { const { t } = useAppTranslation() const [isExpanded, setIsExpanded] = useState(false) const [showDeleteConfirm, setShowDeleteConfirm] = useState(false) @@ -377,6 +426,7 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM serverName={server.name} serverSource={server.source || "global"} alwaysAllowMcp={alwaysAllowMcp} + showDescription={showMcpDescriptions} /> ))} @@ -403,6 +453,7 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM ), )} diff --git a/webview-ui/src/components/mcp/__tests__/McpResourceRow.spec.tsx b/webview-ui/src/components/mcp/__tests__/McpResourceRow.spec.tsx new file mode 100644 index 0000000000..354694cd53 --- /dev/null +++ b/webview-ui/src/components/mcp/__tests__/McpResourceRow.spec.tsx @@ -0,0 +1,40 @@ +import { render, screen } from "@/utils/test-utils" + +import McpResourceRow from "../McpResourceRow" + +const resource = { + uri: "file:///workspace/readme.md", + name: "Workspace readme", + description: "Project overview", + mimeType: "text/markdown", +} + +describe("McpResourceRow", () => { + it("shows resource descriptions by default", () => { + render() + + expect(screen.getByText("Workspace readme: Project overview")).toBeInTheDocument() + }) + + it("hides only the description when requested", () => { + render() + + expect(screen.getByText("Workspace readme")).toBeInTheDocument() + expect(screen.queryByText(/Project overview/)).not.toBeInTheDocument() + expect(screen.getByText("file:///workspace/readme.md")).toBeInTheDocument() + expect(screen.getByText("text/markdown")).toBeInTheDocument() + }) + + it("does not replace a hidden description with placeholder text", () => { + render( + , + ) + + expect(screen.queryByText("Reads a file")).not.toBeInTheDocument() + expect(screen.queryByText("No description")).not.toBeInTheDocument() + expect(screen.getByText("file:///{path}")).toBeInTheDocument() + }) +}) diff --git a/webview-ui/src/components/mcp/__tests__/McpToolRow.spec.tsx b/webview-ui/src/components/mcp/__tests__/McpToolRow.spec.tsx index 156ecb0653..1963805b8a 100644 --- a/webview-ui/src/components/mcp/__tests__/McpToolRow.spec.tsx +++ b/webview-ui/src/components/mcp/__tests__/McpToolRow.spec.tsx @@ -63,6 +63,13 @@ describe("McpToolRow", () => { expect(screen.getByText("A test tool")).toBeInTheDocument() }) + it("hides only the tool description when requested", () => { + render() + + expect(screen.getByText("test-tool")).toBeInTheDocument() + expect(screen.queryByText("A test tool")).not.toBeInTheDocument() + }) + it("does not show always allow checkbox when serverName is not provided", () => { render() @@ -144,6 +151,21 @@ describe("McpToolRow", () => { expect(screen.getByText("Second parameter")).toBeInTheDocument() }) + it("keeps parameter descriptions visible when the tool description is hidden", () => { + const toolWithSchema = { + ...mockTool, + inputSchema: { + type: "object", + properties: { query: { type: "string", description: "Search query" } }, + }, + } + + render() + + expect(screen.queryByText("A test tool")).not.toBeInTheDocument() + expect(screen.getByText("Search query")).toBeInTheDocument() + }) + it("shows toggle switch when serverName is provided and not in chat context", () => { render() diff --git a/webview-ui/src/components/mcp/__tests__/McpView.spec.tsx b/webview-ui/src/components/mcp/__tests__/McpView.spec.tsx index 957797d1e9..9a67669d4f 100644 --- a/webview-ui/src/components/mcp/__tests__/McpView.spec.tsx +++ b/webview-ui/src/components/mcp/__tests__/McpView.spec.tsx @@ -3,12 +3,14 @@ import { fireEvent, render, screen } from "@/utils/test-utils" import McpView from "../McpView" const setMcpEnabled = vi.fn() +const setShowMcpDescriptions = vi.fn() vi.mock("@src/context/ExtensionStateContext", () => ({ useExtensionState: () => ({ mcpServers: [], alwaysAllowMcp: false, mcpEnabled: false, + showMcpDescriptions: true, }), })) @@ -74,4 +76,13 @@ describe("McpView", () => { expect(setMcpEnabled).toHaveBeenCalledWith(false) }) + + it("renders the controlled MCP description setting", () => { + render( + , + ) + + expect(screen.getByText("mcp:showDescriptions.title")).toBeInTheDocument() + expect(screen.getByText("mcp:showDescriptions.description")).toBeInTheDocument() + }) }) diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index b270ff342d..497d9c0cb8 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -39,6 +39,7 @@ import { DEFAULT_AUTO_CLOSE_ZOO_OPENED_FILES_AFTER_USER_EDITED, DEFAULT_AUTO_CLOSE_ZOO_OPENED_NEW_FILES, DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, + DEFAULT_SHOW_MCP_DESCRIPTIONS, ImageGenerationProvider, } from "@roo-code/types" @@ -179,6 +180,7 @@ const SettingsView = forwardRef(({ onDone, t maxOpenTabsContext, maxWorkspaceFiles, mcpEnabled, + showMcpDescriptions, soundEnabled, ttsEnabled, ttsSpeed, @@ -423,6 +425,7 @@ const SettingsView = forwardRef(({ onDone, t terminalProfile: terminalProfile ?? "", // "" clears a saved profile; undefined is dropped by JSON.stringify terminalOutputPreviewSize: terminalOutputPreviewSize ?? "medium", mcpEnabled, + showMcpDescriptions: showMcpDescriptions ?? DEFAULT_SHOW_MCP_DESCRIPTIONS, maxOpenTabsContext: Math.min(Math.max(0, maxOpenTabsContext ?? 20), 500), maxWorkspaceFiles: Math.min(Math.max(0, maxWorkspaceFiles ?? 200), 500), showRooIgnoredFiles: showRooIgnoredFiles ?? true, @@ -914,6 +917,8 @@ const SettingsView = forwardRef(({ onDone, t setCachedStateField("mcpEnabled", value)} + showMcpDescriptions={showMcpDescriptions ?? DEFAULT_SHOW_MCP_DESCRIPTIONS} + setShowMcpDescriptions={(value) => setCachedStateField("showMcpDescriptions", value)} /> )} diff --git a/webview-ui/src/components/settings/__tests__/SettingsView.unsaved-changes.spec.tsx b/webview-ui/src/components/settings/__tests__/SettingsView.unsaved-changes.spec.tsx index 439b859d30..d6b990190d 100644 --- a/webview-ui/src/components/settings/__tests__/SettingsView.unsaved-changes.spec.tsx +++ b/webview-ui/src/components/settings/__tests__/SettingsView.unsaved-changes.spec.tsx @@ -170,13 +170,21 @@ vi.mock("@src/components/modes/ModesView", () => ({ })) vi.mock("@src/components/mcp/McpView", () => ({ - default: ({ mcpEnabled, setMcpEnabled }: any) => ( - + default: ({ mcpEnabled, setMcpEnabled, showMcpDescriptions, setShowMcpDescriptions }: any) => ( + <> + + + ), })) @@ -283,6 +291,7 @@ describe("SettingsView - Unsaved Changes Detection", () => { maxOpenTabsContext: 10, maxWorkspaceFiles: 200, mcpEnabled: false, + showMcpDescriptions: true, soundEnabled: false, ttsEnabled: false, ttsSpeed: 1.0, @@ -605,6 +614,30 @@ describe("SettingsView - Unsaved Changes Detection", () => { ) }) + it("buffers MCP description visibility until Save", async () => { + renderWithExtensionState(, { queryClient }) + + const toggle = await screen.findByTestId("mcp-description-toggle") + fireEvent.click(toggle) + + await waitFor(() => expect(toggle).toHaveAttribute("data-show-mcp-descriptions", "false")) + expect(postMessage).not.toHaveBeenCalledWith( + expect.objectContaining({ + type: "updateSettings", + updatedSettings: expect.objectContaining({ showMcpDescriptions: false }), + }), + ) + + fireEvent.click(screen.getByTestId("save-button")) + + expect(postMessage).toHaveBeenCalledWith( + expect.objectContaining({ + type: "updateSettings", + updatedSettings: expect.objectContaining({ showMcpDescriptions: false }), + }), + ) + }) + it("buffers and saves the complete NanoGPT provider configuration from cached state", async () => { const liveApiConfiguration = { apiProvider: providerIdentifiers.nanogpt, diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 177372f310..e761266967 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -23,6 +23,7 @@ import { ORGANIZATION_ALLOW_ALL, DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, DEFAULT_DIFF_FUZZY_THRESHOLD, + DEFAULT_SHOW_MCP_DESCRIPTIONS, } from "@roo-code/types" import { findLastIndex } from "@roo/array" @@ -218,6 +219,7 @@ const createInitialExtensionState = (): ExtensionState => ({ diffFuzzyThreshold: DEFAULT_DIFF_FUZZY_THRESHOLD, terminalShellIntegrationTimeout: 4000, mcpEnabled: true, + showMcpDescriptions: DEFAULT_SHOW_MCP_DESCRIPTIONS, taskSyncEnabled: false, currentApiConfigName: "default", listApiConfigMeta: [], diff --git a/webview-ui/src/i18n/locales/ca/mcp.json b/webview-ui/src/i18n/locales/ca/mcp.json index 6e9e958a58..cc1ec50fa8 100644 --- a/webview-ui/src/i18n/locales/ca/mcp.json +++ b/webview-ui/src/i18n/locales/ca/mcp.json @@ -8,6 +8,10 @@ "title": "Activa els servidors MCP", "description": "Activa-ho perquè Zoo pugui utilitzar eines dels servidors MCP connectats. Això dóna més capacitats a Zoo. Si no vols utilitzar aquestes eines addicionals, desactiva-ho per ajudar a reduir el cost dels tokens API." }, + "showDescriptions": { + "title": "Mostra les descripcions MCP", + "description": "Mostra les descripcions proporcionades pels servidors MCP per a eines i recursos." + }, "editGlobalMCP": "Edita MCP global", "editProjectMCP": "Edita MCP del projecte", "learnMoreEditingSettings": "Més informació sobre com editar fitxers de configuració MCP", diff --git a/webview-ui/src/i18n/locales/de/mcp.json b/webview-ui/src/i18n/locales/de/mcp.json index c8872d4de3..b94838670d 100644 --- a/webview-ui/src/i18n/locales/de/mcp.json +++ b/webview-ui/src/i18n/locales/de/mcp.json @@ -8,6 +8,10 @@ "title": "MCP-Server aktivieren", "description": "Schalte dies EIN, damit Zoo Tools von verbundenen MCP-Servern verwenden kann. Dies gibt Zoo mehr Möglichkeiten. Wenn du diese zusätzlichen Tools nicht verwenden möchtest, schalte es AUS, um API-Token-Kosten zu senken." }, + "showDescriptions": { + "title": "MCP-Beschreibungen anzeigen", + "description": "Beschreibungen anzeigen, die MCP-Server für Tools und Ressourcen bereitstellen." + }, "editGlobalMCP": "Globale MCP bearbeiten", "editProjectMCP": "Projekt-MCP bearbeiten", "learnMoreEditingSettings": "Mehr über das Bearbeiten von MCP-Einstellungsdateien erfahren", diff --git a/webview-ui/src/i18n/locales/en/mcp.json b/webview-ui/src/i18n/locales/en/mcp.json index f0c033fe74..5c5ec98fd6 100644 --- a/webview-ui/src/i18n/locales/en/mcp.json +++ b/webview-ui/src/i18n/locales/en/mcp.json @@ -8,6 +8,10 @@ "title": "Enable MCP Servers", "description": "Turn this ON to let Zoo use tools from connected MCP servers. This gives Zoo more capabilities. If you don't plan to use these extra tools, turn it OFF to help reduce API token costs." }, + "showDescriptions": { + "title": "Show MCP descriptions", + "description": "Show descriptions supplied by MCP servers for tools and resources." + }, "editGlobalMCP": "Edit Global MCP", "editProjectMCP": "Edit Project MCP", "refreshMCP": "Refresh MCP Servers", diff --git a/webview-ui/src/i18n/locales/es/mcp.json b/webview-ui/src/i18n/locales/es/mcp.json index e31f70c5ce..736cce1105 100644 --- a/webview-ui/src/i18n/locales/es/mcp.json +++ b/webview-ui/src/i18n/locales/es/mcp.json @@ -8,6 +8,10 @@ "title": "Activar servidores MCP", "description": "Actívalo para que Zoo pueda usar herramientas de servidores MCP conectados. Esto le da más capacidades a Zoo. Si no planeas usar estas herramientas extra, desactívalo para ayudar a reducir los costes de tokens API." }, + "showDescriptions": { + "title": "Mostrar descripciones de MCP", + "description": "Muestra las descripciones que proporcionan los servidores MCP para herramientas y recursos." + }, "editGlobalMCP": "Editar MCP global", "editProjectMCP": "Editar MCP del proyecto", "learnMoreEditingSettings": "Más información sobre cómo editar archivos de configuración MCP", diff --git a/webview-ui/src/i18n/locales/fr/mcp.json b/webview-ui/src/i18n/locales/fr/mcp.json index f1f0032680..fc479025e4 100644 --- a/webview-ui/src/i18n/locales/fr/mcp.json +++ b/webview-ui/src/i18n/locales/fr/mcp.json @@ -8,6 +8,10 @@ "title": "Activer les serveurs MCP", "description": "Active cette option pour que Zoo puisse utiliser des outils provenant de serveurs MCP connectés. Cela donne plus de capacités à Zoo. Si tu ne comptes pas utiliser ces outils supplémentaires, désactive-la pour réduire les coûts de tokens API." }, + "showDescriptions": { + "title": "Afficher les descriptions MCP", + "description": "Afficher les descriptions fournies par les serveurs MCP pour les outils et les ressources." + }, "editGlobalMCP": "Modifier le MCP global", "editProjectMCP": "Modifier le MCP du projet", "learnMoreEditingSettings": "En savoir plus sur la modification des fichiers de configuration MCP", diff --git a/webview-ui/src/i18n/locales/hi/mcp.json b/webview-ui/src/i18n/locales/hi/mcp.json index 7dd8b8a415..e9c95915af 100644 --- a/webview-ui/src/i18n/locales/hi/mcp.json +++ b/webview-ui/src/i18n/locales/hi/mcp.json @@ -8,6 +8,10 @@ "title": "MCP सर्वर सक्षम करें", "description": "इसे ON करो ताकि Zoo जुड़े हुए MCP सर्वरों से टूल्स इस्तेमाल कर सके। इससे Zoo को और क्षमताएँ मिलती हैं। अगर तुम ये अतिरिक्त टूल्स इस्तेमाल नहीं करना चाहते, तो इसे OFF करो ताकि API टोकन लागत कम हो सके।" }, + "showDescriptions": { + "title": "MCP विवरण दिखाएँ", + "description": "टूल और संसाधनों के लिए MCP सर्वर द्वारा दिए गए विवरण दिखाएँ।" + }, "editGlobalMCP": "ग्लोबल MCP एडिट करें", "editProjectMCP": "प्रोजेक्ट MCP एडिट करें", "learnMoreEditingSettings": "MCP सेटिंग्स फाइल एडिट करने के बारे में जानें", diff --git a/webview-ui/src/i18n/locales/id/mcp.json b/webview-ui/src/i18n/locales/id/mcp.json index e22b10924a..6d7df3fe80 100644 --- a/webview-ui/src/i18n/locales/id/mcp.json +++ b/webview-ui/src/i18n/locales/id/mcp.json @@ -8,6 +8,10 @@ "title": "Aktifkan Server MCP", "description": "Nyalakan ini untuk membiarkan Zoo menggunakan tools dari server MCP yang terhubung. Ini memberikan Zoo lebih banyak kemampuan. Jika Anda tidak berencana menggunakan tools tambahan ini, matikan untuk membantu mengurangi biaya token API." }, + "showDescriptions": { + "title": "Tampilkan deskripsi MCP", + "description": "Tampilkan deskripsi yang disediakan server MCP untuk tools dan resources." + }, "editGlobalMCP": "Edit MCP Global", "editProjectMCP": "Edit MCP Proyek", "refreshMCP": "Refresh Server MCP", diff --git a/webview-ui/src/i18n/locales/it/mcp.json b/webview-ui/src/i18n/locales/it/mcp.json index dc8e6caa6c..82c5aa9a0f 100644 --- a/webview-ui/src/i18n/locales/it/mcp.json +++ b/webview-ui/src/i18n/locales/it/mcp.json @@ -8,6 +8,10 @@ "title": "Abilita server MCP", "description": "Attiva questa opzione per permettere a Zoo di usare strumenti dai server MCP collegati. Questo dà a Zoo più capacità. Se non vuoi usare questi strumenti extra, disattiva per ridurre i costi dei token API." }, + "showDescriptions": { + "title": "Mostra descrizioni MCP", + "description": "Mostra le descrizioni fornite dai server MCP per strumenti e risorse." + }, "editGlobalMCP": "Modifica MCP globale", "editProjectMCP": "Modifica MCP del progetto", "learnMoreEditingSettings": "Scopri di più sulla modifica dei file di configurazione MCP", diff --git a/webview-ui/src/i18n/locales/ja/mcp.json b/webview-ui/src/i18n/locales/ja/mcp.json index 66151f3d60..87f39b81ff 100644 --- a/webview-ui/src/i18n/locales/ja/mcp.json +++ b/webview-ui/src/i18n/locales/ja/mcp.json @@ -8,6 +8,10 @@ "title": "MCPサーバーを有効化", "description": "これをONにすると、Rooが接続されたMCPサーバーのツールを使えるようになるよ。Rooの機能が増える!追加ツールを使わないなら、APIトークンのコストを抑えるためにOFFにしてね。" }, + "showDescriptions": { + "title": "MCPの説明を表示", + "description": "MCPサーバーが提供するツールとリソースの説明を表示します。" + }, "editGlobalMCP": "グローバルMCPを編集", "editProjectMCP": "プロジェクトMCPを編集", "learnMoreEditingSettings": "MCP設定ファイルの編集方法を詳しく見る", diff --git a/webview-ui/src/i18n/locales/ko/mcp.json b/webview-ui/src/i18n/locales/ko/mcp.json index 2327ef0ca5..49805811d5 100644 --- a/webview-ui/src/i18n/locales/ko/mcp.json +++ b/webview-ui/src/i18n/locales/ko/mcp.json @@ -8,6 +8,10 @@ "title": "MCP 서버 활성화", "description": "이걸 켜면 Roo가 연결된 MCP 서버의 도구를 쓸 수 있어. Roo의 능력이 더 늘어나! 추가 도구를 쓸 생각이 없다면, API 토큰 비용을 줄이기 위해 꺼 두는 게 좋아." }, + "showDescriptions": { + "title": "MCP 설명 표시", + "description": "MCP 서버가 제공하는 도구 및 리소스 설명을 표시합니다." + }, "editGlobalMCP": "글로벌 MCP 편집", "editProjectMCP": "프로젝트 MCP 편집", "learnMoreEditingSettings": "MCP 설정 파일 편집 방법 더 알아보기", diff --git a/webview-ui/src/i18n/locales/nl/mcp.json b/webview-ui/src/i18n/locales/nl/mcp.json index 035f4fa869..4a716ad10b 100644 --- a/webview-ui/src/i18n/locales/nl/mcp.json +++ b/webview-ui/src/i18n/locales/nl/mcp.json @@ -8,6 +8,10 @@ "title": "MCP-servers inschakelen", "description": "Indien ingeschakeld, kan Zoo communiceren met MCP-servers voor geavanceerde functionaliteit. Gebruik je geen MCP, dan kun je dit uitschakelen om het tokengebruik te verminderen." }, + "showDescriptions": { + "title": "MCP-beschrijvingen tonen", + "description": "Toon beschrijvingen die MCP-servers voor tools en bronnen leveren." + }, "editGlobalMCP": "Globale MCP bewerken", "editProjectMCP": "Project-MCP bewerken", "learnMoreEditingSettings": "Meer over het bewerken van MCP-instellingen", diff --git a/webview-ui/src/i18n/locales/pl/mcp.json b/webview-ui/src/i18n/locales/pl/mcp.json index 4854910d5d..e9e469856a 100644 --- a/webview-ui/src/i18n/locales/pl/mcp.json +++ b/webview-ui/src/i18n/locales/pl/mcp.json @@ -8,6 +8,10 @@ "title": "Włącz serwery MCP", "description": "Włącz to, aby Zoo mógł korzystać z narzędzi połączonych serwerów MCP. Daje to Zoo więcej możliwości. Jeśli nie planujesz korzystać z tych dodatkowych narzędzi, wyłącz to, aby zmniejszyć koszty tokenów API." }, + "showDescriptions": { + "title": "Pokaż opisy MCP", + "description": "Pokaż opisy narzędzi i zasobów dostarczane przez serwery MCP." + }, "editGlobalMCP": "Edytuj globalny MCP", "editProjectMCP": "Edytuj MCP projektu", "learnMoreEditingSettings": "Dowiedz się więcej o edycji plików ustawień MCP", diff --git a/webview-ui/src/i18n/locales/pt-BR/mcp.json b/webview-ui/src/i18n/locales/pt-BR/mcp.json index a6acac9283..9956672128 100644 --- a/webview-ui/src/i18n/locales/pt-BR/mcp.json +++ b/webview-ui/src/i18n/locales/pt-BR/mcp.json @@ -8,6 +8,10 @@ "title": "Ativar servidores MCP", "description": "Ative para que o Zoo possa usar ferramentas de servidores MCP conectados. Isso dá mais capacidades ao Zoo. Se você não pretende usar essas ferramentas extras, desative para ajudar a reduzir os custos de tokens da API." }, + "showDescriptions": { + "title": "Mostrar descrições do MCP", + "description": "Mostra as descrições fornecidas pelos servidores MCP para ferramentas e recursos." + }, "editGlobalMCP": "Editar MCP global", "editProjectMCP": "Editar MCP do projeto", "learnMoreEditingSettings": "Saiba mais sobre como editar arquivos de configuração MCP", diff --git a/webview-ui/src/i18n/locales/ru/mcp.json b/webview-ui/src/i18n/locales/ru/mcp.json index 0322016bf4..dd47c8ca33 100644 --- a/webview-ui/src/i18n/locales/ru/mcp.json +++ b/webview-ui/src/i18n/locales/ru/mcp.json @@ -8,6 +8,10 @@ "title": "Включить серверы MCP", "description": "Включи, чтобы Zoo мог использовать инструменты с подключённых серверов MCP. Это даст Zoo больше возможностей. Если не планируешь использовать эти дополнительные инструменты, выключи для экономии токенов API." }, + "showDescriptions": { + "title": "Показывать описания MCP", + "description": "Показывать описания инструментов и ресурсов, предоставленные серверами MCP." + }, "editGlobalMCP": "Редактировать глобальный MCP", "editProjectMCP": "Редактировать проектный MCP", "learnMoreEditingSettings": "Подробнее о редактировании файлов настроек MCP", diff --git a/webview-ui/src/i18n/locales/tr/mcp.json b/webview-ui/src/i18n/locales/tr/mcp.json index 691e30c1dc..4436ab1995 100644 --- a/webview-ui/src/i18n/locales/tr/mcp.json +++ b/webview-ui/src/i18n/locales/tr/mcp.json @@ -8,6 +8,10 @@ "title": "MCP Sunucularını Etkinleştir", "description": "Bunu AÇ, böylece Zoo bağlı MCP sunucularından araçlar kullanabilir. Zoo'ya daha fazla yetenek kazandırır. Ekstra araçları kullanmayacaksan, API token maliyetini azaltmak için bunu KAPAT." }, + "showDescriptions": { + "title": "MCP açıklamalarını göster", + "description": "MCP sunucularının araçlar ve kaynaklar için sağladığı açıklamaları göster." + }, "editGlobalMCP": "Global MCP'yi Düzenle", "editProjectMCP": "Proje MCP'sini Düzenle", "learnMoreEditingSettings": "MCP ayar dosyalarını düzenleme hakkında daha fazla bilgi", diff --git a/webview-ui/src/i18n/locales/vi/mcp.json b/webview-ui/src/i18n/locales/vi/mcp.json index c5bb53c7e1..7c5ab6df59 100644 --- a/webview-ui/src/i18n/locales/vi/mcp.json +++ b/webview-ui/src/i18n/locales/vi/mcp.json @@ -8,6 +8,10 @@ "title": "Bật máy chủ MCP", "description": "Bật lên để Zoo dùng công cụ từ các máy chủ MCP đã kết nối. Zoo sẽ có nhiều khả năng hơn. Nếu không dùng các công cụ này, hãy tắt để tiết kiệm chi phí token API." }, + "showDescriptions": { + "title": "Hiển thị mô tả MCP", + "description": "Hiển thị mô tả do máy chủ MCP cung cấp cho công cụ và tài nguyên." + }, "editGlobalMCP": "Chỉnh sửa MCP toàn cục", "editProjectMCP": "Chỉnh sửa MCP dự án", "learnMoreEditingSettings": "Tìm hiểu thêm về chỉnh sửa file cài đặt MCP", diff --git a/webview-ui/src/i18n/locales/zh-CN/mcp.json b/webview-ui/src/i18n/locales/zh-CN/mcp.json index 070a3a9e3b..877ae01288 100644 --- a/webview-ui/src/i18n/locales/zh-CN/mcp.json +++ b/webview-ui/src/i18n/locales/zh-CN/mcp.json @@ -8,6 +8,10 @@ "title": "启用 MCP 服务器", "description": "开启后 Zoo 可用已连接 MCP 服务器的工具,能力更强。不用这些工具时建议关闭,节省 API Token 费用。" }, + "showDescriptions": { + "title": "显示 MCP 描述", + "description": "显示 MCP 服务器为工具和资源提供的描述。" + }, "editGlobalMCP": "编辑全局 MCP", "editProjectMCP": "编辑项目 MCP", "learnMoreEditingSettings": "了解如何编辑 MCP 设置文件", diff --git a/webview-ui/src/i18n/locales/zh-TW/mcp.json b/webview-ui/src/i18n/locales/zh-TW/mcp.json index 8a416d2992..f4d23a140c 100644 --- a/webview-ui/src/i18n/locales/zh-TW/mcp.json +++ b/webview-ui/src/i18n/locales/zh-TW/mcp.json @@ -8,6 +8,10 @@ "title": "啟用 MCP 伺服器", "description": "啟用此選項後,Zoo 將可使用已連線 MCP 伺服器所提供的工具,進一步提升功能。如果您暫無使用這些額外工具的需求,建議關閉此選項以協助降低 API Token 費用。" }, + "showDescriptions": { + "title": "顯示 MCP 說明", + "description": "顯示 MCP 伺服器為工具和資源提供的說明。" + }, "editGlobalMCP": "編輯全域 MCP", "editProjectMCP": "編輯專案 MCP", "refreshMCP": "重新整理 MCP 伺服器",