navi-web: make the batch shape the schema, drop Brave
Every recorded web_search and web_view call in production carried a scalar
(20 of 20, 8 of 8), including sessions where three searches on one topic went
out one after another. The recommendation was already written in three
places — the parameter description, the tool docstring and the server's
summary line — so prose was not the problem: `str | list[str]` renders as
`anyOf: [string, array]`, and the model took the first branch.

The parameter is now a pure array with minItems/maxItems and an examples
entry. A BeforeValidator folds a bare "query": "…" into a one-item list, so a
laxer caller still works; the cap rides in json_schema_extra rather than
pydantic's max_length, so four queries reach the code that runs three and
names the rest instead of failing validation.

Brave is gone on both paths: the keyed Search API (signup answers 403, so a
third backend that can never be enabled) and the ddgs engine of the same name,
which answers nothing from this host. The chain is SearXNG -> ddgs.

The persona's parallelism rule now separates "several items in one call" from
"several calls in one message" — it used to read "when the profile allows
parallel tool calls", which the model could only read as "not here".
1 parent a276712 commit 6b12e9a925fb99874a239060b252eac685984ba3
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 5 hours ago
Showing 12 changed files
View
deploy/env.template
View
docs/config.md
View
docs/mcp.md
View
docs/tools.md
View
mcp-servers/navi-web/app/config.py
View
mcp-servers/navi-web/app/mcp_server.py
View
mcp-servers/navi-web/app/search.py
View
mcp_servers.d/navi-web.json
View
persona.txt
View
tests/unit/mcp/conftest.py
View
tests/unit/mcp/test_navi_web_schemas.py 0 → 100644
View
tests/unit/mcp/test_navi_web_search.py