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
Copy file name to clipboardExpand all lines: docs/features/mcp/using-mcp-in-roo.mdx
+36-5Lines changed: 36 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -252,13 +252,44 @@ For full SDK documentation, visit the [MCP GitHub repository](https://github.com
252
252
253
253
## Using MCP Tools in Your Workflow
254
254
255
-
After configuring an MCP server, Roo will automatically detect available tools and resources. To use them:
255
+
After configuring an MCP server, Roo automatically detects its available tools and resources. Effectively leveraging these tools involves understanding the core interaction steps and, crucially, how Roo interprets the tools you provide.
256
256
257
-
1. Type your request in the Roo Code chat interface
258
-
2. Roo will identify when an MCP tool can help with your task
259
-
3. Approve the tool use when prompted (or use auto-approval)
257
+
### Core Workflow Steps
260
258
261
-
Example: "Analyze the performance of my API" might use an MCP tool that tests API endpoints.
259
+
Your interaction with MCP tools typically follows this sequence:
260
+
261
+
#### 1. Initiate a Task
262
+
Begin by typing your request in the Roo Code chat interface.
263
+
264
+
#### 2. Tool Identification by Roo
265
+
Roo analyzes your request to determine if an available MCP tool can assist. This stage is highly dependent on the quality of your MCP tool definitions.
266
+
267
+
##### The Critical Role of Descriptions
268
+
Roo's ability to:
269
+
* Identify the *correct* tool for the job,
270
+
* Understand how to structure the necessary parameters, and
271
+
* Avoid misinterpreting a tool's capabilities,
272
+
all hinge on clear, concise, and informative descriptions for both the tools themselves and their parameters. Vague or missing information, especially for parameters, can significantly hinder Roo's ability to select or use a tool effectively.
273
+
274
+
For instance, a request like "Analyze the performance of my API" might lead Roo to consider an MCP tool designed for API endpoint testing. Whether Roo successfully identifies and utilizes this tool as intended is directly influenced by the quality of its description.
275
+
276
+
##### Best Practices for Defining MCP Tools
277
+
To ensure Roo can leverage your MCP tools efficiently, consider the following when defining them in your server:
278
+
279
+
***Tool Name:** Choose a descriptive and unambiguous name that clearly indicates the tool's primary function.
280
+
***Tool Description:** Provide a comprehensive summary of what the tool does, its purpose, and any important context or prerequisites for its use. Explain the outcome or result of using the tool.
281
+
***Parameter Descriptions:** This is critical. For each parameter:
282
+
* Clearly state its purpose and what kind of data it expects (e.g., "User ID for lookup," "File path to process," "Search query string").
283
+
* Specify any formatting requirements, constraints, or an example of a valid value if applicable.
284
+
* Indicate if the parameter is optional or required (though the MCP schema usually handles this, a note can be helpful).
285
+
***Clarity for the AI:** Write descriptions as if you are explaining the tool to another developer (or an AI). The more context Roo has, the better it can integrate the tool into its problem-solving workflows. If a tool is intended to be used in a specific sequence or in conjunction with other tools, mentioning this can also be beneficial.
286
+
***Augment with Custom Instructions:** Beyond the descriptions embedded in the MCP server, you can further guide Roo's usage of specific MCP tools by providing [Custom Instructions](/features/custom-instructions). This allows you to define preferred approaches, outline complex workflows involving multiple tools, or specify when a particular MCP tool should be prioritized or avoided.
287
+
288
+
#### 3. Tool Invocation
289
+
If Roo, guided by the tool descriptions, identifies a suitable tool, it will propose its use. You then approve this (unless [auto-approval](#auto-approve-tools) is configured for trusted tools).
290
+
291
+
### Maximizing Synergy with MCP Servers
292
+
By investing effort in crafting detailed descriptions and potentially augmenting them with custom instructions, you significantly improve the synergy between Roo Code and your MCP servers. This unlocks their full potential for more reliable and efficient task completion.
0 commit comments