diff --git a/mcp-servers/navi-web/app/mcp_server.py b/mcp-servers/navi-web/app/mcp_server.py index 8ec0a28..74aefe0 100644 --- a/mcp-servers/navi-web/app/mcp_server.py +++ b/mcp-servers/navi-web/app/mcp_server.py @@ -42,8 +42,8 @@ return Settings() -@mcp.tool(name="web_search") -async def web_search_tool( +@mcp.tool(name="search") +async def search_tool( query: Annotated[str, Field(description="Search query.")], max_results: Annotated[int, Field(description="Number of results (default 5).")] = 5, ) -> str: @@ -52,8 +52,8 @@ return _json(result) -@mcp.tool(name="web_view") -async def web_view_tool( +@mcp.tool(name="view") +async def view_tool( url: Annotated[str, Field(description="Full URL to open (must start with http:// or https://).")], screenshot: Annotated[bool, Field(description="Also capture a screenshot.")] = False, wait_until: Annotated[ @@ -68,8 +68,8 @@ return _json(result) -@mcp.tool(name="http_request") -async def http_request_tool( +@mcp.tool(name="request") +async def request_tool( method: Annotated[str, Field(description="HTTP method: GET, POST, PUT, PATCH, DELETE.")], url: Annotated[str, Field(description="Full URL to request.")], headers: Annotated[dict[str, str] | None, Field(description="Optional HTTP headers.")] = None, diff --git a/mcp-servers/navi-web/app/search.py b/mcp-servers/navi-web/app/search.py index cef394d..588a4ab 100644 --- a/mcp-servers/navi-web/app/search.py +++ b/mcp-servers/navi-web/app/search.py @@ -105,14 +105,12 @@ def _format(results: list[dict], source: str) -> dict[str, Any]: lines = [ - f"[{i+1}] {r.get('title', '')}\n" - f" URL: {r.get('href') or r.get('url', '')}\n" - f" {r.get('body') or r.get('description', '')}" + f"[{i+1}] {r.get('title', '')} — {r.get('href') or r.get('url', '')}" for i, r in enumerate(results) ] return { "success": True, - "output": f"[{source}]\n\n" + "\n\n".join(lines), + "output": f"[{source}]\n" + "\n".join(lines), "error": None, "metadata": {"results": results, "source": source}, } diff --git a/mcp_servers.json b/mcp_servers.json index f13d36e..17f8a1a 100644 --- a/mcp_servers.json +++ b/mcp_servers.json @@ -58,15 +58,15 @@ }, "groups": { "search": [ - "web_search" + "search" ], "browse": [ - "web_view" + "view" ], "request": [ - "http_request" + "request" ] }, - "instructions": "Navi Web MCP server provides web search, browsing, and raw HTTP tools.\n\nUse it when the task involves:\n- searching the web for current info, docs, or real-time data;\n- opening a URL in a browser to read human-readable content;\n- making REST API calls, webhooks, or raw HTTP requests.\n\nWorkflow:\n1. web_search — find relevant pages or facts.\n2. web_view — open promising URLs to read full content.\n3. http_request — call APIs or services requiring headers/auth.\n\nAll three tools are stateless and work with public URLs.\nNo session_id or filesystem paths are required.\n\nABSOLUTE RULE — NEVER bypass MCP tools:\nYou MUST NOT use filesystem, terminal, code_exec, or any direct file access to read or write web content. Use only the MCP tools listed above." + "instructions": "Navi Web MCP server provides web search, browsing, and raw HTTP tools.\n\nUse it when the task involves:\n- searching the web for current info, docs, or real-time data;\n- opening a URL in a browser to read human-readable content;\n- making REST API calls, webhooks, or raw HTTP requests.\n\nWorkflow:\n1. search — find relevant pages or facts.\n2. view — open promising URLs to read full content.\n3. request — call APIs or services requiring headers/auth.\n\nAll three tools are stateless and work with public URLs.\nNo session_id or filesystem paths are required.\n\nABSOLUTE RULE — NEVER bypass MCP tools:\nYou MUST NOT use filesystem, terminal, code_exec, or any direct file access to read or write web content. Use only the MCP tools listed above." } } \ No newline at end of file diff --git a/navi/profiles/developer/config.json b/navi/profiles/developer/config.json index ca02165..f469cee 100644 --- a/navi/profiles/developer/config.json +++ b/navi/profiles/developer/config.json @@ -66,7 +66,7 @@ "mcp_servers": { "navi-web": [ "search", - "browse", + "view", "request" ] } diff --git a/navi/profiles/discuss/config.json b/navi/profiles/discuss/config.json index 4ea327f..f08bc5f 100644 --- a/navi/profiles/discuss/config.json +++ b/navi/profiles/discuss/config.json @@ -30,7 +30,7 @@ ], "navi-web": [ "search", - "browse", + "view", "request" ] }, diff --git a/navi/profiles/modeler_3d/config.json b/navi/profiles/modeler_3d/config.json index 9e266a9..408ec4b 100644 --- a/navi/profiles/modeler_3d/config.json +++ b/navi/profiles/modeler_3d/config.json @@ -59,7 +59,7 @@ ], "navi-web": [ "search", - "browse", + "view", "request" ] }, diff --git a/navi/profiles/secretary/config.json b/navi/profiles/secretary/config.json index a1261d5..a9ece8b 100644 --- a/navi/profiles/secretary/config.json +++ b/navi/profiles/secretary/config.json @@ -65,7 +65,7 @@ "mcp_servers": { "navi-web": [ "search", - "browse", + "view", "request" ] } diff --git a/navi/profiles/server_admin/config.json b/navi/profiles/server_admin/config.json index 5bc3a06..a1700e0 100644 --- a/navi/profiles/server_admin/config.json +++ b/navi/profiles/server_admin/config.json @@ -64,7 +64,7 @@ ], "navi-web": [ "search", - "browse", + "view", "request" ] }, diff --git a/navi/profiles/tool_developer/config.json b/navi/profiles/tool_developer/config.json index 183b34a..ec20881 100644 --- a/navi/profiles/tool_developer/config.json +++ b/navi/profiles/tool_developer/config.json @@ -75,7 +75,7 @@ "mcp_servers": { "navi-web": [ "search", - "browse", + "view", "request" ] }