Summary
NLWeb's MCP server (POST /mcp) currently exposes only built-in tools (ask, list_sites, who). Extension tools defined in config/tools.xml (e.g. details, compare, ensemble, site-specific tools like cricket_stats and conversation_search) are not discoverable or callable via MCP.
AskAgent/python/webserver/mcp_wrapper.py contains a TODO to integrate router/tools.xml when ready.
Expected behavior
tools/list returns built-in MCP tools plus enabled tools.xml extension tools for the selected site
tools/call dispatches extension tools to their configured <handler> classes
- Optional
site query parameter selects the <Site id="..."> block in tools.xml
- Unknown tools return JSON-RPC error
-32602; invalid JSON returns -32700
- Preserve existing
ask, list_sites, and who behavior
Context
Tool definitions live in config/tools.xml. Handler dispatch pattern exists in core/baseHandler.py and core/router.py. MCP infrastructure exists in webserver/mcp_wrapper.py and webserver/routes/mcp.py.
Summary
NLWeb's MCP server (
POST /mcp) currently exposes only built-in tools (ask,list_sites,who). Extension tools defined inconfig/tools.xml(e.g.details,compare,ensemble, site-specific tools likecricket_statsandconversation_search) are not discoverable or callable via MCP.AskAgent/python/webserver/mcp_wrapper.pycontains a TODO to integrate router/tools.xml when ready.Expected behavior
tools/listreturns built-in MCP tools plus enabledtools.xmlextension tools for the selected sitetools/calldispatches extension tools to their configured<handler>classessitequery parameter selects the<Site id="...">block intools.xml-32602; invalid JSON returns-32700ask,list_sites, andwhobehaviorContext
Tool definitions live in
config/tools.xml. Handler dispatch pattern exists incore/baseHandler.pyandcore/router.py. MCP infrastructure exists inwebserver/mcp_wrapper.pyandwebserver/routes/mcp.py.