libfx passes the turn's abort signal where only the v1 TypeScript SDK reads it

Kind: gap · Status: current · Last verified: 2026-11-27 · Clients: libfx · Revisions: 2025-11-25

Each tool that createMcpAdapter returns runs this call at c3dc80c4:

const send = () => client.callTool({ name: tool.name, arguments: input, ...(correlationId === undefined ? {} : { _meta: { "libfx/correlationId": correlationId } }) }, undefined, { signal });

The second argument is undefined and the third carries the turn's AbortSignal. sdk/types/mcp.d.ts declares the same shape, callTool(params, resultSchema?, options?: { signal?: AbortSignal }), and says the interface follows "the MCP TypeScript SDK v1 signatures". The repo's adapter test asserts both positions: resultSchema is undefined and options.signal is an AbortSignal.

The two published TypeScript clients differ here:

Package callTool Where libfx's { signal } lands
@modelcontextprotocol/sdk 1.32.2 callTool(params, resultSchema = CallToolResultSchema, options) options
@modelcontextprotocol/client 2.4.0 callTool(params, options) A third argument the method does not declare

With the v2 client, options is undefined. The function body in 2.4.0 takes everything from options, options?.signal and options?.timeout included, and does not read a third argument. So the signal does not reach the request, and aborting a libfx turn would not make that client send notifications/cancelled for a tool call in flight.

This was read, not run. The probe drove libfx with @modelcontextprotocol/client 2.4.0 and its tool-result scenarios ran to completion, so listing and calling tools work against v2. listTools(params), getServerVersion(), readResource(params) and getPrompt(params) take the arguments libfx passes in the same positions in both packages. No probe scenario cancels a call.

An application on the v2 client can close the gap by passing an object whose callTool forwards the third argument as the second.

Sources