Skip to content

Name MCP action tools after the action name instead of its id - #4

Merged
Jenik5 merged 2 commits into
Jenik5:mainfrom
mirecekd:feat/readable-tool-names
Oct 5, 2026
Merged

Jenik5 merged 2 commits into
Jenik5:mainfrom
mirecekd:feat/readable-tool-names

Conversation

@mirecekd

@mirecekd mirecekd commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Problem

Configured actions are exposed to Grok as MCP tools named action_<32 hex chars>. Grok shows the tool name, not the optional title, so every action looks the same (action_3f9a...) and the user cannot tell which one is which.

Change

  • Tool name is now an ASCII slug of the action name, e.g. Open the gate -> open_the_gate, Otevřít bránu -> otevrit_branu (max 48 chars).
  • On a clash (two names with the same slug, an empty slug, or the reserved entities_status) the first 6 chars of the action id are appended.
  • The legacy action_<id> name is still accepted by tools/call, so existing clients and cached tool lists keep working.
  • Tools still have an empty input schema; nothing in the permission model changes. The MCP title and description are unchanged.
  • Diagnostics still classify these calls as 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) and tools/check_package.py pass. Also running on a live HA instance with the connector loaded.

@mirecekd
mirecekd force-pushed the feat/readable-tool-names branch from 150cc41 to 2c63c02 Compare October 5, 2026 14:24
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
mirecekd force-pushed the feat/readable-tool-names branch from 2c63c02 to c402f6d Compare October 5, 2026 14:26
@Jenik5
Jenik5 merged commit c0d96e7 into Jenik5:main Oct 5, 2026
4 checks passed
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