koala73/worldmonitor · error
tools/list error: ${listData.error.message}
Error message
tools/list error: ${listData.error.message} What it means
Thrown by mcpListTools when the tools/list JSON-RPC call returned HTTP 2xx but the response payload contained a JSON-RPC error object. The MCP server explicitly reported a protocol-level error while enumerating tools (e.g. unknown method, internal server error in the handler).
Source
Thrown at api/mcp-proxy.ts:324
if (error instanceof McpProxySsrfError) throw error;
/* non-fatal */
}
}
async function mcpListTools(serverUrl, customHeaders) {
const headers = buildHeaders(customHeaders);
const initResp = await postJson(serverUrl, buildInitPayload(), headers, null);
if (!initResp.ok) throw new Error(`Initialize failed: HTTP ${initResp.status}`);
const sessionId = initResp.headers.get('Mcp-Session-Id') || initResp.headers.get('mcp-session-id');
const initData = await parseJsonRpcResponse(initResp);
if (initData.error) throw new Error(`Initialize error: ${initData.error.message}`);
await sendInitialized(serverUrl, headers, sessionId);
const listResp = await postJson(serverUrl, {
jsonrpc: '2.0', id: 2, method: 'tools/list', params: {},
}, headers, sessionId);
if (!listResp.ok) throw new Error(`tools/list failed: HTTP ${listResp.status}`);
const listData = await parseJsonRpcResponse(listResp);
if (listData.error) throw new Error(`tools/list error: ${listData.error.message}`);
return listData.result?.tools || [];
}
async function mcpCallTool(serverUrl, toolName, toolArgs, customHeaders) {
const headers = buildHeaders(customHeaders);
const initResp = await postJson(serverUrl, buildInitPayload(), headers, null);
if (!initResp.ok) throw new Error(`Initialize failed: HTTP ${initResp.status}`);
const sessionId = initResp.headers.get('Mcp-Session-Id') || initResp.headers.get('mcp-session-id');
const initData = await parseJsonRpcResponse(initResp);
if (initData.error) throw new Error(`Initialize error: ${initData.error.message}`);
await sendInitialized(serverUrl, headers, sessionId);
const callResp = await postJson(serverUrl, {
jsonrpc: '2.0', id: 3, method: 'tools/call',
params: { name: toolName, arguments: toolArgs || {} },
}, headers, sessionId);
if (!callResp.ok) throw new Error(`tools/call failed: HTTP ${callResp.status}`);
const callData = await parseJsonRpcResponse(callResp);
if (callData.error) throw new Error(`tools/call error: ${callData.error.message}`);View on GitHub (pinned to 9361220cc0)
Solutions
- Read the embedded error.message — it is the upstream server's JSON-RPC error text
- Verify the server supports the tools/list method in its advertised capabilities
- Restart or reconfigure the MCP server if it reports an internal tool listing failure
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at api/mcp-proxy.ts:322 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of koala73/worldmonitor@9361220cc0 (2026-08-21).
Data as JSON: /api/errors/6ff4cdd5d688713b.
Report an issue: GitHub.