Skip to content

activity: an upstream returning isError:true is recorded as status=success, so real tool failures never surface as errors #935

Closed

Description

@Dumbris

Noticed while doing live QA of the tray glance section (#930), but this is a core-side classification issue and predates that PR.

What happens

When an upstream MCP server returns a result with isError: true — a bad timezone, an unknown tool name, a server-side validation failure — the activity record is stored with status=success. Only mcpproxy's own pre-dispatch argument validation produces status=error.

Why it matters

Every consumer of activity status under-reports failures:

  • The tray glance histogram's "Errors" series and the red ⊗ row markers miss them.
  • The 24h error counts in the usage timeline are correspondingly low.
  • Anyone debugging "why did my tool call not work" sees a green success row for a call that failed.

Reproduced during QA: calls to time:get_current_time with an invalid timezone and to a nonexistent tool both landed as status=success, while an argument-shape violation caught before dispatch landed as status=error.

Suggested fix

Inspect the MCP result's isError flag when recording the activity entry and classify accordingly. Worth deciding explicitly whether an upstream-reported error should be a distinct status from a proxy-side error — they are different things to debug, and the UI could usefully tell them apart.

Activity

  1. added a commit that references this issue on Aug 1, 2026
  2. Dumbris commented on Aug 1, 2026

    @Dumbris
    MemberAuthor

    Fixed in #944 (merged to main as 84f9a2fe8).

    Upstream results carrying isError:true are now classified status=error in the activity record, with the error text drawn from the result content, across all three dispatch paths (handleCallToolVariant, legacy handleCallTool, direct-routing handler) and the paired internal_tool_call record. Usage aggregates and the 24h timeline derive from ActivityRecord.Status, so they are corrected by the same change. The caller-facing result and the pre-dispatch error path are unchanged.

    Live QA (isolated core, stdio fixture returning isError:true) — before, on main:

    tool_call | always_fails | status=success | err=None
    usage: {"tool":"always_fails","calls":1,"errors":0,"error_rate":0}
    

    after, on the branch:

    tool_call          always_fails   status=error   err='QA-935: upstream refused - invalid tenant id'
    internal_tool_call call_tool_read status=error   err='QA-935: upstream refused - invalid tenant id'
    tool_call          always_ok      status=success err=None          <- no false positives
    usage: {"tool":"always_fails","calls":1,"errors":1,"error_rate":1}
    

    Direct-routing path (/mcp/all) verified separately. Left open per the repo's manual-closure convention.

  3. Dumbris commented on Aug 2, 2026

    @Dumbris
    MemberAuthor

    Shipped in v0.53.0-rc.4 (published 2026-08-01). Verified live before merge: upstream isError:true results record as status=error on all dispatch paths, with usage aggregates and the 24h timeline agreeing, and successful calls unaffected.

    Closing now that the fix is in a testable build. Reopen if it does not behave as described on a real install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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