Skip to content

doctor: extend tool-unavailable hint with web toolset#54

Merged
PowerCreek merged 1 commit into
mainfrom
doctor-web-tool-unavailable-hint
May 23, 2026
Merged

doctor: extend tool-unavailable hint with web toolset#54
PowerCreek merged 1 commit into
mainfrom
doctor-web-tool-unavailable-hint

Conversation

@PowerCreek

Copy link
Copy Markdown

Summary

After shipping the image_gen / video_gen hint in #41 / #40, the parallel gap exists for the web toolset — same shape: multi-provider registered with requires_env=[]. Without any provider configured AND ddgs not installed, doctor previously said (system dependency not met) — accurate but unhelpful.

Fix

Add a "web" entry to _doctor_tool_unavailable_detail:

no web-search provider configured — set TAVILY_API_KEY,
BRAVE_SEARCH_API_KEY, EXA_API_KEY, FIRECRAWL_API_KEY, or
SEARXNG_URL; or `pip install ddgs` for the keyless DuckDuckGo
backend (see `hermes tools`)

Calling out ddgs explicitly matters — it's the simplest unblock for operators on a lightweight install who don't want to deal with API keys at all. Everyone else picks their preferred paid / self-hosted provider from the list.

Test plan

  • New test_web_mentions_provider_envs in tests/hermes_cli/test_doctor.py::TestDoctorToolUnavailableDetail: asserts each env var appears in the hint plus the keyless ddgs callout.
  • pytest tests/hermes_cli/test_doctor.py → 71 passed (70 prior + 1 new).

Filed by hermes-maintainer (PowerCreek).

After shipping the image_gen / video_gen hint in #41 / #40,
the parallel gap exists for the web toolset — same shape:
multi-provider, registered with requires_env=[]. Without any
provider configured + ddgs not installed, doctor previously
said "(system dependency not met)" — accurate but unhelpful.

Add a "web" entry to _doctor_tool_unavailable_detail listing
the alternative env vars:
  TAVILY_API_KEY, BRAVE_SEARCH_API_KEY, EXA_API_KEY,
  FIRECRAWL_API_KEY, SEARXNG_URL — or `pip install ddgs` for
  the keyless DuckDuckGo backend.

Calling out ddgs explicitly matters: it's the simplest unblock
for operators on a lightweight install who don't want to deal
with API keys at all. Everyone else picks their preferred paid /
self-hosted provider from the list.

Test mirrors the image_gen + video_gen pattern — asserts each
env var appears in the hint plus the keyless ddgs callout.
@PowerCreek PowerCreek merged commit 5ef0fc6 into main May 23, 2026
@PowerCreek PowerCreek deleted the doctor-web-tool-unavailable-hint branch May 23, 2026 04:28
PowerCreek added a commit that referenced this pull request May 25, 2026
#96)

Operators who narrow the tool surface via HERMES_TOOLS_SUBSET can
now confirm at ``hermes doctor`` time exactly which tools the
filter parsed to. Catches two failure modes that previously
required a separate ``hermes mcp list`` diff:

1. Operator typoed a tool name → still in the parsed list (no
   cross-check), but the diff against ``hermes mcp list`` is now
   trivial.
2. Operator forgot the ``mcp_<server>_<tool>`` prefix for MCP
   tools → no entry uses ``mcp_`` prefix but entries look
   structured → info reminder fires.

Silent when env var is unset/empty (silent-when-irrelevant pattern
from the #88/#53/#54 doctor probes). When set, surfaces:

  * check_ok with the count + a sample of names (first 6, then
    ``+N more`` suffix to keep the row readable);
  * check_info reminder when zero entries use the mcp_ prefix but
    some look structured (the most common parse-correctly-but-
    filter-nothing failure mode).

Cross-check against the live MCP registry was considered + rejected
for this PR — it would require spinning up ``create_mcp_server()``
at probe time. Operators can ``hermes mcp list`` separately if they
want the full diff. Filing as opportunistic follow-up if demand
shows up.

## Tests

- 8 new tests in tests/hermes_cli/test_doctor_tools_subset_probe.py:
  silent-when-unset / silent-when-empty / silent-when-whitespace /
  count-and-sample-shown / long-list-truncated / mcp-prefix-reminder
  / no-reminder-when-mcp-present / no-reminder-when-only-simple-bare-
  names.
- 30 total green across affected suites (probe + provider-env-probe
  + mcp_subset_filter). No regression.
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.

1 participant