Skip to content

Conversation

@NightRare
Copy link

This is to fix [#228] Tool names with colons violate MCP naming pattern

What I did
Update tool name prefix separator from colon : to double underscore __

Related issue

This fixes #228

This is to fix [docker#228] Tool names with colons violate MCP naming pattern
@NightRare NightRare requested a review from a team as a code owner November 22, 2025 04:52
Copy link

@isiahw1 isiahw1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and Verified

I've built and tested this PR locally and can confirm it successfully fixes the tool naming issue.

Test Results

Before PR #263:

  • Tool names used colon separator: github-official:search_repositories
  • Violated MCP naming pattern: ^[a-zA-Z0-9_-]{1,64}$

After PR #263:

  • Tool names use double underscore: github-official__search_repositories
  • Complies with MCP naming pattern ✓

Testing Process

  1. Cloned repo and checked out PR branch (commit 88c3b9f)
  2. Built with make docker-mcp
  3. Verified installation: docker mcp version shows commit hash
  4. Tested with docker mcp gateway run --servers github-official
  5. Captured tool list output showing proper double-underscore format

Example Output

"name":"github-official__add_comment_to_pending_review"
"name":"github-official__add_issue_comment"
"name":"github-official__create_pull_request"

All 40 GitHub tools now use the correct naming convention.

Recommendation

This is a simple, focused fix that resolves issue #228. The change is minimal (one line) and works as expected. Ready to merge. 🚀

@null-runner
Copy link

Hey @NightRare, thanks for this fix!

While testing the __ separator change, I discovered that there's an additional issue preventing tool-name-prefix from working correctly: the gateway forwards the prefixed tool name to the remote server instead of the original name.

For example, when a client calls chromedev__new_page, the gateway sends chromedev__new_page to the remote server, which only knows about new_page and returns "tool not found".

I've opened #278 with a complementary fix that passes the original tool name to the handler. Together with your separator change, this should make tool-name-prefix fully functional.

@NightRare
Copy link
Author

Hey @NightRare, thanks for this fix!

While testing the __ separator change, I discovered that there's an additional issue preventing tool-name-prefix from working correctly: the gateway forwards the prefixed tool name to the remote server instead of the original name.

For example, when a client calls chromedev__new_page, the gateway sends chromedev__new_page to the remote server, which only knows about new_page and returns "tool not found".

I've opened #278 with a complementary fix that passes the original tool name to the handler. Together with your separator change, this should make tool-name-prefix fully functional.

Thank you for the PR. This is a very good catch! 🎉

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.

Tool names with colons violate MCP naming pattern

3 participants