deepseek-ai/deepseek-harness · error

mcp-client(${opts.serverName}): server listed tool "${tool.n

Error message

mcp-client(${opts.serverName}): server listed tool "${tool.name}" more than once — invalid tool list

What it means

Error "mcp-client(${opts.serverName}): server listed tool "${tool.name}" more than once — invalid tool list" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/mcp/mcp-client/src/tools.ts:157

 *   during the swap phase (only after the fetch phase succeeded).
 * @returns A map of registered public tool names to their unregister
 *   disposers — the exact set of live registrations owned by this server.
 */
export async function syncTools(
  client: Client,
  ctx: Context,
  opts: ToolBridgeOptions,
  previous: ToolDisposers,
): Promise<ToolDisposers> {
  // Phase 1: fetch and build the next generation without touching the registry.
  const definitions = new Map<string, ToolDefinition>()
  let cursor: string | undefined
  do {
    const response = await listToolsUncached(client, cursor)
    for (const tool of response.tools) {
      const publicName = publicToolName(opts.serverName, tool.name)
      if (definitions.has(publicName)) {
        throw new Error(
          `mcp-client(${opts.serverName}): server listed tool "${tool.name}" more than once — invalid tool list`,
        )
      }
      definitions.set(publicName, createDefinition(
        client,
        ctx,
        publicName,
        tool.name,
        tool.description ?? '',
        tool.inputSchema,
        supportedOutputSchema(tool.outputSchema),
        tool.execution?.taskSupport === 'required',
        opts,
      ))
    }
    cursor = response.nextCursor
  } while (cursor)

View on GitHub (pinned to b150a551b8)

Solutions

  1. Fix the MCP server to list each tool only once.

When it happens

Trigger: Thrown at packages/mcp/mcp-client/src/tools.ts:157 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/139ffa044c822a72. Report an issue: GitHub.