Repository navigation
Name MCP action tools after the action name instead of its id - #4
Merged
Merged
Conversation
mirecekd
force-pushed
the
feat/readable-tool-names
branch
from
October 5, 2026 14:24
150cc41 to
2c63c02
Compare
Tools were exposed as action_<uuid>, which Grok shows verbatim. Derive an ASCII slug from the action name (suffix with the id on clash); the old action_<uuid> name is still accepted.
mirecekd
force-pushed
the
feat/readable-tool-names
branch
from
October 5, 2026 14:26
2c63c02 to
c402f6d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Configured actions are exposed to Grok as MCP tools named
action_<32 hex chars>. Grok shows the toolname, not the optionaltitle, so every action looks the same (action_3f9a...) and the user cannot tell which one is which.Change
Open the gate->open_the_gate,Otevřít bránu->otevrit_branu(max 48 chars).entities_status) the first 6 chars of the action id are appended.action_<id>name is still accepted bytools/call, so existing clients and cached tool lists keep working.configured_action.Note: the slug depends on the action name, so renaming an action changes its tool name (renaming already revokes access, as documented).
Tests
Updated the tool-list test and added tests for the readable name, the legacy name and slug/clash handling.
python -m unittest discover -s tests(79 tests) andtools/check_package.pypass. Also running on a live HA instance with the connector loaded.