Skip to content

fix: preserve MCP toolsets when saving platform tools#1390

Open
teknium1 wants to merge 1 commit intomainfrom
hermes/hermes-45b79a59
Open

fix: preserve MCP toolsets when saving platform tools#1390
teknium1 wants to merge 1 commit intomainfrom
hermes/hermes-45b79a59

Conversation

@teknium1
Copy link
Contributor

Summary

  • salvage the contributor fix from fix: Preserve MCP tools when saving platform toolsets #1260 onto current main
  • preserve only dynamic MCP toolsets (mcp-<server>) when hermes tools saves platform_toolsets
  • avoid preserving hermes-* platform presets, which would otherwise re-expand the full preset after a user narrows their selection
  • update the regression tests to use the actual dynamic MCP naming model and add a guard for preset retention

Why

The original PR was addressing a real bug: hermes tools could strip dynamic MCP toolsets from platform_toolsets on save. On current main, the stale branch needed conflict resolution, and the preservation rule needed tightening so we only keep real MCP dynamic toolsets instead of every non-configurable entry.

Contributor credit:

Test plan

  • python -m pytest tests/hermes_cli/test_tools_config.py tests/tools/test_mcp_tool.py -n0 -q
  • python -m pytest tests/ -n0 -q

When using `hermes tools` to configure toolsets, MCP server names
were being removed from platform_toolsets because _save_platform_tools
only saved CONFIGURABLE_TOOLSETS entries.

This fix preserves any non-configurable entries (like MCP server names)
that were already in the config, merging them with the user's new selection.

Closes #1247
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants