Skip to content

[FEATURE] Convert static documentation tools to MCP resources / skill references #766

@kingpanther13

Description

@kingpanther13

What would you like to see?

Building on @sergeykad's proposal, convert 4 documentation-only tools into MCP resources and skill reference files, removing them from tools/list:

Tool to remove What it does today Proposed replacement
ha_get_dashboard_guide Returns static dashboard_guide.md from disk Skill reference file in home-assistant-best-practices
ha_get_card_documentation No-arg: returns card types list from static card_types.json. With arg: fetches card docs from GitHub Skill reference file for the card types list. MCP resource URI template ha://docs/cards/{card_type} for the GitHub fetch
ha_get_domain_docs Fetches integration docs from GitHub MCP resource URI template ha://docs/domains/{domain}
ha_config_info Returns hardcoded guidance text about how ha-mcp configuration access works (remote API vs filesystem, which tool families exist, YAML snippet workflow). Takes a config_type param (general/automation/script/dashboard/integration/yaml) — zero API calls, 100% static strings Content folded into the best-practices skill

The static content moves into the existing home-assistant-best-practices skill as reference files (companion issue: homeassistant-ai/skills#20).

The GitHub-fetching capabilities become MCP resource URI templates. When resources/read is called with e.g. ha://docs/cards/light, the server fetches from GitHub and returns the content. This works in both config modes:

  • Default (ENABLE_SKILLS_AS_TOOLS=false): LLM uses resources/read directly
  • Skills-as-tools mode: ResourcesAsTools auto-exposes them as tool operations

Why do you need this?

ha-mcp has 91+ tools. Every tool definition consumes tokens in the tools/list context. These 4 tools return reference data that never modifies HA state — they don't belong in the tool list.

MCP resources are the correct primitive for read-only reference data accessed by URI. This approach:

  • Frees 4 tool slots from the context window
  • Uses the existing skills infrastructure (SkillsDirectoryProvider, ResourcesAsTools transform) — no new patterns needed
  • Ensures all clients can still access the content: resource-capable clients use resources/read, others use the ENABLE_SKILLS_AS_TOOLS=true fallback

Additional context

Companion issue for skill reference files: homeassistant-ai/skills#20

I would plan to add a bit in the relevant tool descriptions to give them a heads up of the existing skills resources as well, so they're more likely to be referenced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions