You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vscode.workspace.workspaceFolders?.map((folder)=>folder.uri.fsPath).at(0)??path.join(os.homedir(),"Desktop")// may or may not exist but fs checking existence would immediately ask for permission which would be bad UX, need to come up with a better solution
Copy file name to clipboardExpand all lines: src/core/prompts/system.ts
+9-4Lines changed: 9 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ import { McpHub } from "../../services/mcp/McpHub"
9
9
exportconstSYSTEM_PROMPT=async(
10
10
cwd: string,
11
11
supportsComputerUse: boolean,
12
-
mcpHub: McpHub,
12
+
mcpHub?: McpHub,
13
13
diffStrategy?: DiffStrategy,
14
14
browserViewportSize?: string
15
15
)=>`You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
@@ -146,6 +146,7 @@ Usage:
146
146
: ""
147
147
}
148
148
149
+
${mcpHub ? `
149
150
## use_mcp_tool
150
151
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.
151
152
Parameters:
@@ -173,7 +174,7 @@ Usage:
173
174
<access_mcp_resource>
174
175
<server_name>server name here</server_name>
175
176
<uri>resource URI here</uri>
176
-
</access_mcp_resource>
177
+
</access_mcp_resource>` : ''}
177
178
178
179
## ask_followup_question
179
180
Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth.
@@ -229,6 +230,7 @@ Your final result description here
229
230
<line_count>14</line_count>
230
231
</write_to_file>
231
232
233
+
${mcpHub ? `
232
234
## Example 3: Requesting to use an MCP tool
233
235
234
236
<use_mcp_tool>
@@ -247,7 +249,7 @@ Your final result description here
247
249
<access_mcp_resource>
248
250
<server_name>weather-server</server_name>
249
251
<uri>weather://san-francisco/current</uri>
250
-
</access_mcp_resource>
252
+
</access_mcp_resource>` : ''}
251
253
252
254
# Tool Use Guidelines
253
255
@@ -272,6 +274,7 @@ By waiting for and carefully considering the user's response after each tool use
272
274
273
275
====
274
276
277
+
${mcpHub ? `
275
278
MCP SERVERS
276
279
277
280
The Model Context Protocol (MCP) enables communication between the system and locally running MCP servers that provide additional tools and resources to extend your capabilities.
@@ -675,7 +678,7 @@ However some MCP servers may be running from installed packages rather than a lo
675
678
676
679
The user may not always request the use or creation of MCP servers. Instead, they might provide tasks that can be completed with existing tools. While using the MCP SDK to extend your capabilities can be useful, it's important to understand that this is just one specialized type of task you can accomplish. You should only implement MCP servers when the user explicitly requests it (e.g., "add a tool that...").
677
680
678
-
Remember: The MCP documentation and example provided above are to help you understand and work with existing MCP servers or create new ones when requested by the user. You already have access to tools and capabilities that can be used to accomplish a wide range of tasks.
681
+
Remember: The MCP documentation and example provided above are to help you understand and work with existing MCP servers or create new ones when requested by the user. You already have access to tools and capabilities that can be used to accomplish a wide range of tasks.` : ''}
679
682
680
683
====
681
684
@@ -693,7 +696,9 @@ CAPABILITIES
693
696
? "\n- You can use the browser_action tool to interact with websites (including html files and locally running development servers) through a Puppeteer-controlled browser when you feel it is necessary in accomplishing the user's task. This tool is particularly useful for web development tasks as it allows you to launch a browser, navigate to pages, interact with elements through clicks and keyboard input, and capture the results through screenshots and console logs. This tool may be useful at key stages of web development tasks-such as after implementing new features, making substantial changes, when troubleshooting issues, or to verify the result of your work. You can analyze the provided screenshots to ensure correct rendering or identify errors, and review console logs for runtime issues.\n - For example, if asked to add a component to a react website, you might create the necessary files, use execute_command to run the site locally, then use browser_action to launch the browser, navigate to the local server, and verify the component renders & functions correctly before closing the browser."
694
697
: ""
695
698
}
699
+
${mcpHub ? `
696
700
- 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.
When enabled, Cline will be able to interact with MCP servers for advanced functionality. If you're not using MCP, you can disable this to reduce Cline's token usage.
0 commit comments