refactor: remove web tools from agent (dispatch handles all web work)

Reduces tool count from 10 to 8 for the LLM, removing the conflict
between 'use dispatch for everything' and having web_search available.
The task_worker has its own web tools for background tasks.
This commit is contained in:
Shane
2026-08-23 08:13:37 -04:00
parent c815bcb485
commit 65deb0e4ce
+1 -18
View File
@@ -89,8 +89,7 @@ SYSTEM_PROMPT = textwrap.dedent("""\
This includes: looking up news, researching topics, checking current This includes: looking up news, researching topics, checking current
events, prices, sports scores, writing something, summarizing, comparing events, prices, sports scores, writing something, summarizing, comparing
options, planning, or anything that takes more than a couple seconds to options, planning, or anything that takes more than a couple seconds to
think through. Do NOT use web_search or web_scrape directly; always think through. Memory recall/remember is NEVER a dispatch task —
dispatch instead. Memory recall/remember is NEVER a dispatch task —
call those tools directly. call those tools directly.
Examples: Examples:
- User says "what's the latest news?" → CALL dispatch_task with - User says "what's the latest news?" → CALL dispatch_task with
@@ -350,22 +349,6 @@ def build_mcp_toolsets() -> list[mcp.MCPToolset]:
""" """
toolsets: list[mcp.MCPToolset] = [] toolsets: list[mcp.MCPToolset] = []
if WEB_MCP_ENABLED:
python_bin = os.path.join(os.path.dirname(os.path.abspath(__file__)), ".venv", "bin", "python")
web_mcp_script = os.path.join(os.path.dirname(os.path.abspath(__file__)), "web_mcp.py")
toolsets.append(
mcp.MCPToolset(
id="web-access",
mcp_server=mcp.MCPServerStdio(
command=python_bin,
args=[web_mcp_script],
env={**os.environ, "FIRECRAWL_BASE": FIRECRAWL_BASE},
client_session_timeout_seconds=120,
),
)
)
logger.info("Web-access MCP toolset enabled (Firecrawl at %s)", FIRECRAWL_BASE)
python_bin = os.path.join(os.path.dirname(os.path.abspath(__file__)), ".venv", "bin", "python") python_bin = os.path.join(os.path.dirname(os.path.abspath(__file__)), ".venv", "bin", "python")
weather_mcp_script = os.path.join(os.path.dirname(os.path.abspath(__file__)), "weather_mcp.py") weather_mcp_script = os.path.join(os.path.dirname(os.path.abspath(__file__)), "weather_mcp.py")
toolsets.append( toolsets.append(