feat(agent): add MCP server discovery mode for agent tool input#3353
feat(agent): add MCP server discovery mode for agent tool input#3353waleedlatif1 merged 17 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds a new "mcp-server" tool type that enables agents to dynamically discover and use all tools from an MCP server at execution time, rather than requiring individual tool selection. Key Changes:
Implementation Quality:
Minor Issues:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User opens tool picker] --> B{Navigates to MCP Servers}
B --> C[Shows server folders with tool count]
C --> D{User clicks server folder}
D --> E[Drilldown: Shows Back + Use all tools + Individual tools]
E --> F{User selects Use all N tools}
F --> G[Creates mcp-server StoredTool with serverId]
G --> H[Removes individual tools from same server]
H --> I[Tool stored in workflow config]
I --> J[Agent execution starts]
J --> K[AgentHandler.prepareTools]
K --> L{Separates tool types}
L --> M[mcpTools array]
L --> N[mcpServerSelections array]
L --> O[otherTools array]
N --> P[processMcpServerSelections]
P --> Q[For each server: discoverMcpToolsForServer]
Q --> R[Get all tools from MCP server]
R --> S[createMcpToolFromDiscoveredServerTool for each]
S --> T[buildMcpTool - same as individual MCP tools]
T --> U[Returns array of tool definitions]
M --> V[processMcpToolsBatched]
O --> W[Process other tools]
U --> X[Combine all tools]
V --> X
W --> X
X --> Y[Agent executes with expanded tool set]
Last reviewed commit: 6e2fb7c |
Additional Comments (4)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
|
@greptile |
|
@cursor review |
|
@greptile |
|
@cursor review |
…s, and usage control
…ng DB import, route ArrowRight through handleSelect
b8f36cb to
ca14f4d
Compare
|
@greptile |
|
@cursor review |
...components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx
Show resolved
Hide resolved
|
@greptile |
|
@cursor review |
Additional Comments (1)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
|
@cursor review |
|
@greptile |
Additional Comments (1)
|
Summary
mcp-servertool type that lets agents dynamically discover and use all tools from an MCP server at execution timediscoverMcpToolsForServer, and create tools throughbuildMcpTool(same pipeline as individual MCP tools)keepOpenoption to combobox to support expandable dropdown sectionsisMcpServerAlreadySelectedhelper andmcp-serverguards throughout selected tool renderingType of Change
Testing
Tested manually
Checklist