-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: remove MCP SERVERS section from system prompt #10895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: remove MCP SERVERS section from system prompt #10895
Conversation
MCP tools are now included in the native tools array sent with API requests, so the system prompt no longer needs a separate MCP SERVERS section. - Delete src/core/prompts/sections/mcp-servers.ts - Remove getMcpServersSection export from sections/index.ts - Remove MCP section from system.ts prompt template - Update related tests and snapshots
Reviewed latest commit (e1d84b6) which adds the missing No issues found. Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
|
@roomote can you fix the conflicts here? |
Resolved merge conflicts with main. All local checks passed. |
- Resolved conflict in src/core/prompts/system.ts to keep MCP section removal - Resolved conflict in src/core/prompts/__tests__/add-custom-instructions.spec.ts to remove MCP server creation test
|
@roomote Still a failing test |
Fixed the failing test by adding missing |
Summary
Removes the MCP SERVERS section from the system prompt since MCP tools are now included in the native tools array sent with API requests.
Problem
MCP tools were being duplicated in two places:
getMcpServerTools())getMcpServersSection())This duplication was unnecessary and added extra tokens to the system prompt.
Solution
src/core/prompts/sections/mcp-servers.tsgetMcpServersSectionexport fromsections/index.tssystem.tsprompt templateMCP tools continue to work via the native tools array sent in API requests.
Test Plan
Resolves COM-550
Important
Removes MCP SERVERS section from system prompt, relying on native tools array for MCP tools.
system.ts.mcp-servers.tsand removesgetMcpServersSectionexport fromsections/index.ts.add-custom-instructions.spec.tsanduseMcpToolTool.spec.ts.This description was created by
for e1d84b6. You can customize this summary. It will automatically update as commits are pushed.