• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

archetech / archon / 29365431238
90%

Build:
DEFAULT BRANCH: main
Ran 14 Jul 2026 08:25PM UTC
Jobs 1
Files 61
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Jul 2026 08:22PM UTC coverage: 90.282% (+0.04%) from 90.245%
29365431238

push

github

web-flow
fix: return MCP-spec tool results (isError, structuredContent) (#719)

* fix: return MCP-spec tool results (isError, structuredContent)

Tool results wrapped every payload in a custom `{ ok, result }` / `{ ok, error }`
envelope and never set `isError`, so every failure -- a locked wallet, a node
error, a business-logic error -- reached clients as a successful tool call.

Per the MCP spec, tool execution errors are reported with `isError: true`, and
structured payloads belong in `structuredContent` (a JSON object) mirrored by a
serialized text block. There is no `ok` field in the protocol.

- fail(): sets `isError: true`, message in a text block (still redacted).
- ok(): text block always; `structuredContent` when the result is a JSON object.
  Arrays and scalars ride the text block alone rather than in an invented
  wrapper, since the spec requires structuredContent to be an object.
- Results are typed as the SDK's `CallToolResult` instead of an untyped literal.
- structuredContent is derived from the serialized text, so keys with undefined
  values (e.g. an absent mimeType) are dropped by both, not one.

No outputSchema: the spec says a server MUST conform to a declared output
schema, but handlers return `unknown` from a Keymaster cast to `any`. Per-tool
output schemas and typed handler returns are a follow-up.

Closes #691

BREAKING CHANGE: MCP tool results no longer use the `{ ok, result }` /
`{ ok, error }` envelope. Failures set `isError: true` with the message as text;
successes return the payload as JSON text plus `structuredContent` for objects.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: gate structuredContent on the serialized payload

A JS object can serialize to a JSON scalar -- a Date, or anything with a
toJSON() returning a non-object -- so testing the raw result let a string
through as structuredContent, which MCP requires to be a JSON object. Gate on
the parsed payload instead, so the object guarantee ... (continued)

2924 of 3470 branches covered (84.27%)

Branch coverage included in aggregate %.

9 of 9 new or added lines in 1 file covered. (100.0%)

6087 of 6511 relevant lines covered (93.49%)

834.94 hits per line

Jobs
ID Job ID Ran Files Coverage
1 29365431238.1 14 Jul 2026 08:25PM UTC 122
91.46
GitHub Action Run
Source Files on build 29365431238
  • Tree
  • List 61
  • Changed 56
  • Source Changed 1
  • Coverage Changed 56
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29365431238
  • 8242c99c on github
  • Prev Build on main (#29119280939)
  • Next Build on main (#29369266466)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc