Skip to content

Tell a gateway failure after the backend call from one before it #2822

Open

Description

@ChrisJBurns

Depends on: the "to file" row in "Phase 3, Track: ToolHive — The remaining ToolHive changes for audit, sign-out, and schedules" (#2570) for the vMCP saying whether a failed call reached the backend
Related: #2536, #2570, #2564, #2731, #2812
Removes shortcut: a tool error result is read as a completed call, even when the gateway's backend call failed after it may have run (#2536)

Problem

The MCP client in #2536 counts any tools/call result as a completed call. ToolHive's vMCP (v0.65.0, on the 2025-11-25 protocol the client uses) returns every backend failure as an ordinary tool error result at HTTP 200, including failures after it sent the call to the backend: a timeout, a dropped connection, or a backend 5xx. The tool may have run, but the model is told it failed, and the send-once claim is completed, so a new tool call can run it again.

The vMCP also returns its own refusals before it calls the backend as tool error results, so the client cannot tell "never ran" from "may have run" from "ran and failed".

Design

What

Done when

Through the embedded vMCP, a backend timeout after the call was sent reports an unknown outcome, a vMCP refusal before the backend reports the call as not run, and a gateway that sends no signal keeps today's behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions