mirror of
https://github.com/crewAIInc/crewAI.git
synced 2025-12-16 04:18:35 +00:00
docs: update recommendation filters for MCP and Enterprise tools (#3041)
This commit is contained in:
@@ -124,7 +124,7 @@ from crewai_tools import CrewaiEnterpriseTools
|
|||||||
enterprise_tools = CrewaiEnterpriseTools(
|
enterprise_tools = CrewaiEnterpriseTools(
|
||||||
actions_list=["gmail_find_email"] # only gmail_find_email tool will be available
|
actions_list=["gmail_find_email"] # only gmail_find_email tool will be available
|
||||||
)
|
)
|
||||||
gmail_tool = enterprise_tools[0]
|
gmail_tool = enterprise_tools["gmail_find_email"]
|
||||||
|
|
||||||
gmail_agent = Agent(
|
gmail_agent = Agent(
|
||||||
role="Gmail Manager",
|
role="Gmail Manager",
|
||||||
|
|||||||
@@ -85,6 +85,22 @@ with MCPServerAdapter(server_params) as mcp_tools:
|
|||||||
```
|
```
|
||||||
This general pattern shows how to integrate tools. For specific examples tailored to each transport, refer to the detailed guides below.
|
This general pattern shows how to integrate tools. For specific examples tailored to each transport, refer to the detailed guides below.
|
||||||
|
|
||||||
|
## Filtering Tools
|
||||||
|
|
||||||
|
```python
|
||||||
|
with MCPServerAdapter(server_params) as mcp_tools:
|
||||||
|
print(f"Available tools: {[tool.name for tool in mcp_tools]}")
|
||||||
|
|
||||||
|
my_agent = Agent(
|
||||||
|
role="MCP Tool User",
|
||||||
|
goal="Utilize tools from an MCP server.",
|
||||||
|
backstory="I can connect to MCP servers and use their tools.",
|
||||||
|
tools=mcp_tools["tool_name"], # Pass the loaded tools to your agent
|
||||||
|
reasoning=True,
|
||||||
|
verbose=True
|
||||||
|
)
|
||||||
|
# ... rest of your crew setup ...
|
||||||
|
```
|
||||||
## Explore MCP Integrations
|
## Explore MCP Integrations
|
||||||
|
|
||||||
<CardGroup cols={2}>
|
<CardGroup cols={2}>
|
||||||
|
|||||||
Reference in New Issue
Block a user