From bb967128b825aa478be350cb0a67a58dac47ea7c Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:14:05 -0800 Subject: [PATCH] Fix copy for mcp settings --- package.json | 16 ++++++++-------- src/core/prompts/system.ts | 14 +++++++------- src/services/mcp/McpHub.ts | 2 +- src/shared/mcp.ts | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index c5018ffd14..c7b95a1fec 100644 --- a/package.json +++ b/package.json @@ -145,22 +145,22 @@ "cline.mcp.mode": { "type": "string", "enum": [ - "enabled", - "mcp-tools-only", - "disabled" + "full", + "server-use-only", + "off" ], "enumDescriptions": [ - "Full MCP functionality including server use and build instructions", - "Enable MCP server use but exclude build instructions from AI prompts to save tokens", + "Enable all MCP functionality (server use and build instructions)", + "Enable MCP server use only (excludes instructions about building MCP servers)", "Disable all MCP functionality" ], - "default": "enabled", - "description": "Control MCP server functionality and its inclusion in AI prompts. When disabled, Cline will not be aware of MCP capabilities, saving model context window tokens." + "default": "full", + "description": "Controls MCP inclusion in prompts, reduces token usage if you only need access to certain functionality." }, "cline.enableCheckpoints": { "type": "boolean", "default": true, - "description": "Enable checkpoint creation during task execution" + "description": "Enables extension to save checkpoints of workspace throughout the task." } } } diff --git a/src/core/prompts/system.ts b/src/core/prompts/system.ts index 213ce107a3..3c26f70d75 100644 --- a/src/core/prompts/system.ts +++ b/src/core/prompts/system.ts @@ -178,7 +178,7 @@ Usage: } ${ - mcpHub.getMode() !== "disabled" + mcpHub.getMode() !== "off" ? ` ## use_mcp_tool Description: Request to use a tool provided by a connected MCP server. Each MCP server can provide multiple tools with different capabilities. Tools have defined input schemas that specify required and optional parameters. @@ -310,7 +310,7 @@ return ( ${ - mcpHub.getMode() !== "disabled" + mcpHub.getMode() !== "off" ? ` ## Example 4: Requesting to use an MCP tool @@ -357,7 +357,7 @@ It is crucial to proceed step-by-step, waiting for the user's message after each By waiting for and carefully considering the user's response after each tool use, you can react accordingly and make informed decisions about how to proceed with the task. This iterative process helps ensure the overall success and accuracy of your work. ${ - mcpHub.getMode() !== "disabled" + mcpHub.getMode() !== "off" ? ` ==== @@ -410,7 +410,7 @@ ${ } ${ - mcpHub.getMode() === "enabled" + mcpHub.getMode() === "full" ? ` ## Creating an MCP Server @@ -887,7 +887,7 @@ CAPABILITIES : "" } ${ - mcpHub.getMode() !== "disabled" + mcpHub.getMode() !== "off" ? ` - You have access to MCP servers that may provide additional tools and resources. Each server may provide different capabilities that you can use to accomplish tasks more effectively. ` @@ -913,7 +913,7 @@ RULES - The user may provide a file's contents directly in their message, in which case you shouldn't use the read_file tool to get the file contents again since you already have it. - Your goal is to try to accomplish the user's task, NOT engage in a back and forth conversation.${ supportsComputerUse - ? `\n- The user may ask generic non-development tasks, such as "what\'s the latest news" or "look up the weather in San Diego", in which case you might use the browser_action tool to complete the task if it makes sense to do so, rather than trying to create a website or using curl to answer the question.${mcpHub.getMode() !== "disabled" ? "However, if an available MCP server tool or resource can be used instead, you should prefer to use it over browser_action." : ""}` + ? `\n- The user may ask generic non-development tasks, such as "what\'s the latest news" or "look up the weather in San Diego", in which case you might use the browser_action tool to complete the task if it makes sense to do so, rather than trying to create a website or using curl to answer the question.${mcpHub.getMode() !== "off" ? "However, if an available MCP server tool or resource can be used instead, you should prefer to use it over browser_action." : ""}` : "" } - NEVER end attempt_completion result with a question or request to engage in further conversation! Formulate the end of your result in a way that is final and does not require further input from the user. @@ -929,7 +929,7 @@ RULES : "" } ${ - mcpHub.getMode() !== "disabled" + mcpHub.getMode() !== "off" ? ` - MCP operations should be used one at a time, similar to other tool usage. Wait for confirmation of success before proceeding with additional operations. ` diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index ab58b18582..9c6fee3a56 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -68,7 +68,7 @@ export class McpHub { } getMode(): McpMode { - return vscode.workspace.getConfiguration("cline.mcp").get("mode", "enabled") + return vscode.workspace.getConfiguration("cline.mcp").get("mode", "full") } async getMcpServersPath(): Promise { diff --git a/src/shared/mcp.ts b/src/shared/mcp.ts index 863a93201b..a8ae7f70f6 100644 --- a/src/shared/mcp.ts +++ b/src/shared/mcp.ts @@ -1,4 +1,4 @@ -export type McpMode = "enabled" | "mcp-tools-only" | "disabled" +export type McpMode = "full" | "server-use-only" | "off" export type McpServer = { name: string