t8y2/dbx · error · Error

DBX MCP did not expose required tools: ${missing.join(", ")}

Error message

DBX MCP did not expose required tools: ${missing.join(", ")}

What it means

After initializing the child MCP server, the bridge calls tools/list and filters by the enabled set; if any required enabled tool name is absent from the server's advertised tools, it throws listing the missing names. This enforces the host's tool contract at startup.

Source

Thrown at crates/dbx-core/assets/pi-mcp-bridge.mjs:170

          onAbort();
        } else {
          signal.addEventListener("abort", onAbort, { once: true });
        }
      }
    });

  await request("initialize", {
    protocolVersion: "2025-03-26",
    capabilities: {},
    clientInfo: { name: "dbx-pi-bridge", version: "1" },
  });
  send({ jsonrpc: "2.0", method: "notifications/initialized", params: {} });

  const toolList = await request("tools/list");
  const tools = (toolList?.tools ?? []).filter((tool) => enabledTools.has(tool.name));
  const missing = [...enabledTools].filter((name) => !tools.some((tool) => tool.name === name));
  if (missing.length > 0) {
    throw new Error(`DBX MCP did not expose required tools: ${missing.join(", ")}`);
  }

  for (const tool of tools) {
    pi.registerTool({
      name: tool.name,
      label: tool.title ?? tool.name,
      description: tool.description ?? "",
      parameters: tool.inputSchema ?? { type: "object", properties: {} },
      async execute(_toolCallId, params, signal) {
        const result = await request("tools/call", { name: tool.name, arguments: params ?? {} }, signal);
        if (result?.isError) {
          throw new Error(textFromContent(result.content) || `DBX MCP tool failed: ${tool.name}`);
        }
        return {
          content: piContent(result?.content),
          details: result ?? null,
        };
      },

View on GitHub (pinned to c0390bff16)

Solutions

  1. Align DBX_PI_MCP_ENABLED_TOOLS with names actually returned by tools/list (inspect the server or its docs)
  2. Upgrade/downgrade the MCP server so it exposes the required tools, or fix typos in tool names
  3. Log toolList?.tools before filtering to see what the server actually exposes

Example fix

// before
export DBX_PI_MCP_ENABLED_TOOLS='["dbx_search","dbx_read_v2"]' // v2 not exposed
// after
export DBX_PI_MCP_ENABLED_TOOLS='["dbx_search","dbx_read"]'
Defensive patterns

Strategy: validation

Validate before calling

const listed = (await request('tools/list'))?.tools ?? [];
const names = new Set(listed.map((t) => t.name));
const missing = [...enabledTools].filter((n) => !names.has(n));
if (missing.length) console.error('server lacks tools:', missing);

Type guard

function exposesAllTools(listResult, enabled) {
  const names = new Set((listResult?.tools ?? []).map((t) => t?.name));
  return [...enabled].every((n) => names.has(n));
}

Try / catch

try {
  registerDbxMcpBridge(pi);
} catch (e) {
  if (e.message.startsWith('DBX MCP did not expose required tools')) {
    console.error('Tool contract mismatch — check server version vs enabled tools:', e.message);
  }
  throw e;
}

Prevention

When it happens

Trigger: ENABLED_TOOLS_ENV names a tool the MCP server does not implement; server version removed/renamed a tool; tools/list response malformed (tools not an array of objects with name); wrong server binary launched.

Common situations: Version skew between host expectations and the MCP server; typos in the enabled-tools env list; server exposes tools conditionally (feature flags, auth scope).

Related errors


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/968bef552833c7e2. Report an issue: GitHub.