Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Jan 22, 2026

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:

  1. In the native tools array sent with API requests (via getMcpServerTools())
  2. In the system prompt text (via getMcpServersSection())

This duplication was unnecessary and added extra tokens to the system prompt.

Solution

  • 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

MCP tools continue to work via the native tools array sent in API requests.

Test Plan

  • All existing tests pass
  • MCP tools still function correctly via native tool array

Resolves COM-550


Important

Removes MCP SERVERS section from system prompt, relying on native tools array for MCP tools.

  • Behavior:
    • Removes MCP SERVERS section from system prompt in system.ts.
    • Deletes mcp-servers.ts and removes getMcpServersSection export from sections/index.ts.
    • Updates related tests and snapshots in add-custom-instructions.spec.ts and useMcpToolTool.spec.ts.
  • Testing:
    • Ensures MCP tools function via native tool array.
    • All existing tests pass.

This description was created by Ellipsis for e1d84b6. You can customize this summary. It will automatically update as commits are pushed.

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
@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners January 22, 2026 16:20
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 22, 2026
@roomote
Copy link
Contributor

roomote bot commented Jan 22, 2026

Rooviewer Clock   See task on Roo Cloud

Reviewed latest commit (e1d84b6) which adds the missing nativeArgs property to the fuzzy matching test, ensuring consistency with all other tests in the file.

No issues found.

Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 23, 2026
@mrubens
Copy link
Collaborator

mrubens commented Jan 24, 2026

@roomote can you fix the conflicts here?

@roomote
Copy link
Contributor

roomote bot commented Jan 24, 2026

Fixaroo Clock   See task on Roo Cloud

Resolved merge conflicts with main. All local checks passed.

View commit | Revert commit

- 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
@mrubens
Copy link
Collaborator

mrubens commented Jan 24, 2026

@roomote Still a failing test

@roomote
Copy link
Contributor

roomote bot commented Jan 24, 2026

Fixaroo Clock   See task on Roo Cloud

Fixed the failing test by adding missing nativeArgs to the fuzzy matching test case. All local checks passed.

View commit | Revert commit

@mrubens mrubens merged commit 84f7409 into main Jan 24, 2026
10 checks passed
@mrubens mrubens deleted the feature/com-550-remove-mcp-servers-section-from-system-prompt branch January 24, 2026 06:16
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jan 24, 2026
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants