Skip to main content
Glama

Add a custom HACS repository

hacs_add_custom_repository
Idempotent

Register a custom HACS or Marketplace repository by URL and category so it becomes installable; this adds the source only and does not install it.

Instructions

Register a custom repository with HACS / the Marketplace so it becomes installable.

Calls marketplace/repositories/add on HA 2026.11+ or hacs/repositories/add on older HA, with url as its repository field and category. This only registers the repository — it does not install it.

Use when: a repository is not in the default store and needs adding before it can be installed. Not for: installing an already-registered repository — use hacs_install_hacs_repository. Returns: {"status": "ok", "backend": "marketplace"|"hacs"}, or an error dict. Errors: {"error", "code", "backend", "hint"} when url/category is invalid or the command fails; the Marketplace needs the first-run warning accepted (warning_not_accepted) and a connected GitHub account (github_not_connected), both in Settings -> Marketplace (as an add-on see hint); unknown_command when neither backend is available.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>",
      "category": "<category>"
    },
    "name": "hacs_add_custom_repository"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesFull URL of the repository to register, e.g. a GitHub repo URL.
categoryYesCategory for the repository: integration, plugin, theme or template (HACS before HA 2026.11 also accepts appdaemon and python_script).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.28.1
    • changedInput schema / properties / category / description
      Previous value: -"HACS category for the repository: integration, plugin, theme, template, appdaemon or python_script."New value: +"Category for the repository: integration, plugin, theme or template (HACS before HA 2026.11 also accepts appdaemon and python_script)."
    • changedInput schema / properties / url / description
      Previous value: -"Full URL of the repository to register with HACS, e.g. a GitHub repo URL."New value: +"Full URL of the repository to register, e.g. a GitHub repo URL."
  2. Changed2 schema fields changedv0.25.1
    • addedInput schema / properties / category / description
      Added value: +"HACS category for the repository: integration, plugin, theme, template, appdaemon or python_script."
    • addedInput schema / properties / url / description
      Added value: +"Full URL of the repository to register with HACS, e.g. a GitHub repo URL."
  3. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial behavior beyond annotations: backend command selection for different HA versions, field mapping, the fact that it registers but does not install, and detailed error conditions including Marketplace warning acceptance and GitHub connection requirements. It does not contradict the idempotent or non-destructive annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action, then uses compact labeled sections for use cases, exclusions, return shape, and errors. Despite covering multiple backend paths and failure modes, every sentence serves a clear purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complete for a two-parameter mutation with annotations and an output schema. It covers backend variance, success behavior, error codes, prerequisites, and sibling routing, leaving no material gap for an agent invoking the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents both parameters thoroughly. The description notes that `url` maps to the backend's `repository` field and that `category` is passed through, but this is incremental context rather than meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: registers a custom repository with HACS/Marketplace so it becomes installable. It also explicitly distinguishes registration from installation, and the sibling tools include install/update/uninstall operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit 'Use when' guidance for repositories not in the default store, plus a 'Not for' exclusion directing installation to `hacs_install_hacs_repository`. This is exactly the when-to-use and alternative-routing information an agent needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools