Skip to content

Commit f547d0f

Browse files
fix: Reword tool search warnings to target clients, not Claude models (#2077)
* fix: Reword tool search warnings to target clients, not Claude models The enable_tool_search warnings blamed Sonnet/Opus models for a conflict that belongs to clients with built-in deferred tool search (claude.ai, Claude Desktop, Claude Code). Deferred tools are a client feature, not a model feature: clients that inline all tool schemas (e.g. GitHub Copilot CLI) benefit from ha-mcp's tool search regardless of model. Claude clients should keep using their built-in tool search instead of ha-mcp's. Updated on every surface carrying the warning: settings UI locales (all languages), both add-on flavors' translations and DOCS.md, README, and the locale source baseline. Closes #2059 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix: Update settings.js fallback copy of the tool search warning Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix: Drop the exact full-catalog token figure from tool search help The ~46K number drifts as the catalog grows; state the reduction as a percentage and keep only the post-enable idle figure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix: Frame deferred-tools guidance around the client/model combination The absolute 'client feature, not a model feature' claim contradicted the model-based examples beside it (Codex review). The deciding question is whether the current client/model combination loads the full catalog up front. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: kingpanther13 <kingpanther13@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 70cb939 commit f547d0f

23 files changed

Lines changed: 198 additions & 144 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,9 @@ Skills can still be installed manually for clients that prefer local skill files
324324

325325
## 🔍 Tool Discovery for AI Agents
326326

327-
By default, the full tool catalog (~84 tools) is listed to the client through the standard MCP `tools/list` response. Clients with deferred / on-demand tool loading (Claude Sonnet, Claude Opus) handle that fine — tools are pulled into context only when needed, so idle context cost is near-zero.
327+
By default, the full tool catalog (~84 tools) is listed to the client through the standard MCP `tools/list` response. Clients with deferred / on-demand tool loading (claude.ai, Claude Desktop, Claude Code) handle that fine — tools are pulled into context only when needed, so idle context cost is near-zero.
328328

329-
For models *without* deferred tool support — Claude Haiku, Gemini, ChatGPT OpenAI-compatible local models, smaller open-weights models — listing the full tool catalog up front adds a lot of idle context and can overwhelm smaller models. To address that, the server ships with a **search-based discovery mode** built on top of FastMCP's BM25 search transform.
329+
For setups *without* deferred tool support — models like Claude Haiku, Gemini, OpenAI-compatible local models and smaller open-weights models, or clients that inline all tool schemas regardless of model (e.g. GitHub Copilot CLI) — listing the full tool catalog up front adds a lot of idle context and can overwhelm smaller models. To address that, the server ships with a **search-based discovery mode** built on top of FastMCP's BM25 search transform.
330330

331331
### Smaller or local LLMs (Ollama, etc.)
332332

@@ -356,11 +356,11 @@ The proxy split lets MCP clients apply different permission policies per categor
356356

357357
### When to enable
358358

359-
- **Claude Haiku, OpenAI-compatible local models, Gemini, ChatGPT or any model without native deferred tool support** — large idle-context savings.
359+
- **Claude Haiku, OpenAI-compatible local models, Gemini, or any model without native deferred tool support** — large idle-context savings. The same applies to clients that inline all tool schemas regardless of model (e.g. GitHub Copilot CLI, even when running Claude Sonnet/Opus).
360360
- MCP clients that cap total tool count (some cap at 100) — surfaces a minimal set (~10 tools) instead of 84.
361361
- **Cost-sensitive deployments** — fewer idle tokens per turn.
362362

363-
Leave it off when using Claude Sonnet/Opus or any client with deferred tool loading; the full catalog has no idle cost there and direct calls skip the search step. If you choose to use our toolsearch then you should disable the native Claude Opus/Sonnet toolsearch, which is called deferred tools in the settings.
363+
Leave it off in clients with deferred tool loading (claude.ai, Claude Desktop, Claude Code); the full catalog has no idle cost there, direct calls skip the search step, and the client's built-in tool search is the better choice — there is no benefit to running ha-mcp's on top of it. Whether tools are deferred depends on the client and model combination: the same model can behave differently per client — GitHub Copilot CLI running Claude Sonnet/Opus inlines the full catalog and still benefits from tool search here. Some Codex models and ChatGPT include deferred tools too — check your client/model directly to confirm its features so you don't leave this enabled unnecessarily.
364364

365365
> 🔄 **Refresh your client's tool list after changing this (or any) setting.** Toggling `ENABLE_TOOL_SEARCH` (or changing pinned/disabled tools, Read Only Mode, etc.) changes the tools the server exposes, but your AI client keeps serving its **cached** tool list until it re-fetches. Restarting the add-on or Home Assistant does **not** refresh the client — reconnect or refresh the MCP server in your client (e.g. re-add/refresh the connector in ChatGPT, or close and reopen Claude Desktop). If you skip this, newly enabled tools won't appear in the client at all, and tools the server no longer exposes still show as available but return `Unknown tool` when called. ChatGPT sometimes keeps serving the stale list even after the connector is removed and re-added under the same name — if tools are still missing after re-adding, delete the connector and create a new one with a **different name**.
366366

homeassistant-addon-dev/DOCS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The dev add-on uses the same configuration as the stable version. See the main a
1414
|--------|-------------|---------|
1515
| `backup_hint` | Backup strength preference | `normal` |
1616
| `secret_path` | Custom secret path (optional) | auto-generated |
17-
| `enable_tool_search` | Replace full tool catalog with search-based discovery (~46K → ~5K tokens). ⚠️ Do NOT enable for Claude Sonnet/Opus — their built-in tool search conflicts with ha-mcp's. Disable one or the other. | `false` |
17+
| `enable_tool_search` | Replace full tool catalog with search-based discovery (cuts idle context by ~90%, to ~5K tokens). ⚠️ Do NOT enable in clients with built-in tool search / deferred tools (claude.ai, Claude Desktop, Claude Code) — the layers conflict; use the client's built-in search instead. | `false` |
1818
| `enable_tool_security_policies` | Gate high-stakes tool calls (lock/alarm control, automation writes, etc.) behind user approval. Guarded calls block until the user clicks Approve in the Tool Security Policies tab of the web UI. Per-tool rules with optional argument conditions are configured in that same tab. | `false` |
1919
| `read_only_mode` | Toggles all write tools off, and removes ability for tools to make any write or destructive calls. Mixed read/write tools (backups, add-ons, energy preferences, voice pipelines, and code mode when enabled) stay available with their write operations blocked. Same toggle as the web UI Tools tab. | `false` |
2020
| `enable_beta_features` *(master)* | Master gate for the beta sub-flags below. Sub-flags are ignored at runtime while this is off — even when explicitly set to true. Mirrored to the web settings UI under "Beta features (dangerous)". | `true` |

homeassistant-addon-dev/translations/de.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,22 @@ configuration:
2020
name: Tool-Suche aktivieren
2121
description: >-
2222
Ersetzt den vollständigen Tool-Katalog durch suchbasierte Entdeckung.
23-
Reduziert den Leerlauf-Kontext von ~46K auf ~5K Tokens. ⚠️ Aktiviere dies
24-
NICHT, wenn du Claude im Sonnet- oder Opus-Modus verwendest – diese
25-
Modelle haben ihre eigene integrierte Tool-Suche / aufgeschobene Tools,
26-
die mit unserer kollidiert. Um die Tool-Suche von ha-mcp mit Claude zu
27-
verwenden, deaktiviere zuerst Claudes integrierte Tool-Suche; lasse dies
28-
andernfalls ausgeschaltet. Verwende dies nur mit LLMs, denen native
29-
aufgeschobene Tools fehlen (z. B. Claude Haiku, lokale OpenAI-kompatible
30-
Modelle) oder mit kleineren Kontextfenstern. Tools werden über
31-
ha_search_tools gefunden und über kategorisierte Proxys
32-
(read/write/delete) ausgeführt. Erfordert Neustart, um wirksam zu werden.
23+
Reduziert den Leerlauf-Kontext um rund 90 % auf etwa 5K Tokens. ⚠️
24+
Aktiviere dies NICHT in Clients mit eigener integrierter Tool-Suche /
25+
aufgeschobenen Tools (claude.ai, Claude Desktop, Claude Code) – die
26+
beiden Suchebenen kollidieren, und die integrierte Tool-Suche des
27+
Clients ist dort die bessere Wahl; lasse dies ausgeschaltet. Ob Tools
28+
aufgeschoben werden, hängt von der Kombination aus Client und Modell ab:
29+
Verwende dies, wenn dein Setup den vollständigen Katalog von Anfang an
30+
lädt – Modelle ohne native aufgeschobene Tools (z. B. Gemini, lokale
31+
OpenAI-kompatible Modelle, Claude Haiku), Clients, die alle
32+
Tool-Schemata unabhängig vom Modell direkt einbetten (z. B. GitHub
33+
Copilot CLI), oder kleinere Kontextfenster. Auch einige Codex-Modelle
34+
und ChatGPT haben aufgeschobene Tools – prüfe direkt bei deinem
35+
Client/Modell, welche Features er hat, damit du dies nicht unnötig
36+
aktiviert lässt. Tools werden über ha_search_tools gefunden und über
37+
kategorisierte Proxys (read/write/delete) ausgeführt. Erfordert
38+
Neustart, um wirksam zu werden.
3339
enable_tool_security_policies:
3440
name: Tool-Sicherheitsrichtlinien aktivieren (erweitert)
3541
description: >-

homeassistant-addon-dev/translations/en.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,21 @@ configuration:
1818
enable_tool_search:
1919
name: Enable tool search
2020
description: >-
21-
Replace the full tool catalog with search-based discovery. Reduces
22-
idle context from ~46K to ~5K tokens. ⚠️ Do NOT enable this if you
23-
use Claude in Sonnet or Opus modes — those models have their own
24-
built-in tool search / deferred tools, which conflicts with ours.
25-
To use ha-mcp's tool search with Claude, disable Claude's built-in
26-
tool search first; otherwise leave this off. Use this only with
27-
LLMs that lack native deferred tools (e.g. Claude Haiku, local
28-
OpenAI-compatible models) or with smaller context windows. Tools
29-
are found via ha_search_tools and executed via categorized proxies
30-
(read/write/delete). Requires restart to take effect.
21+
Replace the full tool catalog with search-based discovery. Reduces idle
22+
context by roughly 90%, to about 5K tokens. ⚠️ Do NOT enable this in
23+
clients with their own built-in tool search / deferred tools (claude.ai,
24+
Claude Desktop, Claude Code) — the two search layers conflict, and the
25+
client's built-in tool search is the better choice there; leave this
26+
off. Whether tools are deferred depends on your client and model
27+
combination: use this when your setup loads the full catalog up front —
28+
models without native deferred tools (e.g. Gemini, OpenAI-compatible
29+
local models, Claude Haiku), clients that inline all tool schemas
30+
regardless of model (e.g. GitHub Copilot CLI), or smaller context
31+
windows. Some Codex models and ChatGPT include deferred tools too —
32+
check your client/model directly to confirm its features so you don't
33+
leave this enabled unnecessarily. Tools are found via ha_search_tools
34+
and executed via categorized proxies (read/write/delete). Requires
35+
restart to take effect.
3136
enable_tool_security_policies:
3237
name: Enable Tool Security Policies (advanced)
3338
description: >-

homeassistant-addon-dev/translations/es.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,23 @@ configuration:
2020
name: Activar la búsqueda de herramientas
2121
description: >-
2222
Sustituye el catálogo completo de herramientas por un descubrimiento
23-
basado en búsqueda. Reduce el contexto en reposo de unos 46K a unos 5K tokens.
24-
⚠️ NO actives esto si usas Claude en modo Sonnet u Opus: esos modelos
25-
tienen su propia búsqueda de herramientas / herramientas diferidas
26-
integrada, que entra en conflicto con la nuestra. Para usar la búsqueda de
27-
herramientas de ha-mcp con Claude, desactiva primero la búsqueda integrada
28-
de Claude; si no, deja esto desactivado. Úsalo solo con LLM que carezcan de
29-
herramientas diferidas nativas (p. ej. Claude Haiku, modelos locales
30-
compatibles con OpenAI) o con ventanas de contexto más pequeñas. Las
31-
herramientas se localizan mediante ha_search_tools y se ejecutan a través
32-
de proxies por categoría (lectura/escritura/borrado). Requiere reiniciar
33-
para que surta efecto.
23+
basado en búsqueda. Reduce el contexto en reposo en torno a un 90 %,
24+
hasta unos 5K tokens. ⚠️ NO actives esto en clientes con su propia
25+
búsqueda de herramientas / herramientas diferidas integrada (claude.ai,
26+
Claude Desktop, Claude Code): las dos capas de búsqueda entran en
27+
conflicto y la búsqueda integrada del cliente es allí la mejor opción;
28+
deja esto desactivado. Que las herramientas se difieran depende de la
29+
combinación de cliente y modelo: usa esto cuando tu configuración carga
30+
el catálogo completo de entrada — modelos sin herramientas diferidas
31+
nativas (p. ej. Gemini, modelos locales compatibles con OpenAI, Claude
32+
Haiku), clientes que insertan todos los esquemas de herramientas sea
33+
cual sea el modelo (p. ej. GitHub Copilot CLI) o ventanas de contexto
34+
más pequeñas. Algunos modelos Codex y ChatGPT también incluyen
35+
herramientas diferidas: comprueba directamente con tu cliente/modelo qué
36+
características tiene para no dejar esto activado innecesariamente. Las
37+
herramientas se localizan mediante ha_search_tools y se ejecutan a
38+
través de proxies por categoría (lectura/escritura/borrado). Requiere
39+
reiniciar para que surta efecto.
3440
enable_tool_security_policies:
3541
name: Activar las políticas de seguridad de herramientas (avanzado)
3642
description: >-

homeassistant-addon-dev/translations/fr.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,23 @@ configuration:
2020
name: Activer la recherche d'outils
2121
description: >-
2222
Remplace le catalogue complet d'outils par une découverte basée sur la
23-
recherche. Réduit le contexte inactif d'environ 46K à 5K tokens. ⚠️
24-
N'active PAS ceci si tu utilises Claude en modes Sonnet ou Opus — ces
25-
modèles ont leur propre recherche d'outils intégrée / outils différés, qui
26-
entre en conflit avec la nôtre. Pour utiliser la recherche d'outils de
27-
ha-mcp avec Claude, désactive d'abord la recherche d'outils intégrée de
28-
Claude ; sinon, laisse ceci désactivé. Utilise ceci uniquement avec des
29-
LLM qui n'ont pas d'outils différés natifs (p. ex. Claude Haiku, modèles
30-
locaux compatibles OpenAI) ou avec des fenêtres de contexte plus petites.
31-
Les outils sont trouvés via ha_search_tools et exécutés via des proxys
32-
catégorisés (lecture/écriture/suppression). Nécessite un redémarrage pour
33-
prendre effet.
23+
recherche. Réduit le contexte inactif d'environ 90 %, à près de 5K
24+
tokens. ⚠️ N'active PAS ceci dans les clients qui ont leur propre
25+
recherche d'outils intégrée / outils différés (claude.ai, Claude
26+
Desktop, Claude Code) — les deux couches de recherche entrent en
27+
conflit, et la recherche d'outils intégrée du client y est le meilleur
28+
choix ; laisse ceci désactivé. Le report des outils dépend de la
29+
combinaison client/modèle : utilise ceci lorsque ta configuration charge
30+
le catalogue complet d'emblée — modèles sans outils différés natifs (p.
31+
ex. Gemini, modèles locaux compatibles OpenAI, Claude Haiku), clients
32+
qui intègrent tous les schémas d'outils quel que soit le modèle (p. ex.
33+
GitHub Copilot CLI), ou fenêtres de contexte plus petites. Certains
34+
modèles Codex et ChatGPT incluent aussi des outils différés — vérifie
35+
directement auprès de ton client/modèle quelles fonctionnalités il
36+
possède pour ne pas laisser ceci activé inutilement. Les outils sont
37+
trouvés via ha_search_tools et exécutés via des proxys catégorisés
38+
(lecture/écriture/suppression). Nécessite un redémarrage pour prendre
39+
effet.
3440
enable_tool_security_policies:
3541
name: Activer les politiques de sécurité des outils (avancé)
3642
description: >-

homeassistant-addon-dev/translations/ru.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,21 @@ configuration:
2020
name: Включить поиск инструментов
2121
description: >-
2222
Заменяет полный каталог инструментов поиском по запросу. Уменьшает
23-
неиспользуемый контекст примерно с 46 тыс. до 5 тыс. токенов. ⚠️ НЕ
24-
включайте этот параметр, если используете Claude в режимах Sonnet или
25-
Opus: у этих моделей есть собственный встроенный поиск инструментов и
26-
отложенные инструменты, которые конфликтуют с нашими. Чтобы использовать
27-
поиск инструментов ha-mcp с Claude, сначала отключите встроенный поиск
28-
инструментов Claude; в противном случае оставьте этот параметр выключенным.
29-
Используйте его только с LLM без собственных отложенных инструментов
30-
(например, Claude Haiku или локальными OpenAI-совместимыми моделями) либо
31-
с небольшими контекстными окнами. Инструменты находятся через
23+
неиспользуемый контекст примерно на 90 % — до порядка 5 тыс. токенов. ⚠️
24+
НЕ включайте этот параметр в клиентах с собственным встроенным поиском
25+
инструментов и отложенными инструментами (claude.ai, Claude Desktop,
26+
Claude Code): два слоя поиска конфликтуют, а встроенный поиск
27+
инструментов клиента там — лучший выбор; оставьте этот параметр
28+
выключенным. Будут ли инструменты отложенными, зависит от сочетания
29+
клиента и модели: используйте этот параметр, когда ваша конфигурация
30+
загружает полный каталог сразу — модели без собственных отложенных
31+
инструментов (например, Gemini, локальные OpenAI-совместимые модели,
32+
Claude Haiku), клиенты, которые встраивают все схемы инструментов
33+
независимо от модели (например, GitHub Copilot CLI), или небольшие
34+
контекстные окна. Некоторые модели Codex и ChatGPT тоже включают
35+
отложенные инструменты — уточните непосредственно у своего
36+
клиента/модели, какие функции он поддерживает, чтобы не оставлять этот
37+
параметр включённым без необходимости. Инструменты находятся через
3238
ha_search_tools и выполняются через распределённые по категориям прокси
3339
(чтение, запись, удаление). Для применения требуется перезапуск.
3440
enable_tool_security_policies:

0 commit comments

Comments
 (0)