Skip to content

feat(logic_extensions/http): post hooks inspect and override MCP content - #31

Merged
wdawson merged 4 commits into
mainfrom
wils/post-hook-content
Sep 28, 2026
Merged

wdawson merged 4 commits into
mainfrom
wils/post-hook-content

Conversation

@wdawson

@wdawson wdawson commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Please don't merge yet. This has to land right before the engine PRs (see the merge order below). Merging it early breaks the monorepo engine's go generate check for every other PR.

Summary

  • Add optional content to PostHookRequest: the content blocks a remote MCP server returned alongside its structured result, in MCP wire shape (every block type, with annotations and _meta).
  • Add optional content to PostHookOverride. It replaces the blocks. Omitting it forwards them unchanged, the same as output.
  • New ContentBlock schema: a required type, plus the fields that type defines per the MCP spec.
  • Bump to 1.2.0-beta. The change is additive and optional, so it stays http/1.0. A hook server that strictly validates requests against the old schema, rejecting unknown fields, will reject requests carrying content with a 400. Loosen that validation before upgrading the engine.

A post hook that redacts output must now redact content too. A hook that leaves content alone lets the server's text through unchanged.

Companion PRs

  • ArcadeAI/monorepo#4556: forwards the upstream MCP text.
  • ArcadeAI/monorepo#4582: the engine side, stacked on #4556.

Merge order: this PR first. Then the stacked PR merges into ArcadeAI/monorepo#4556 once its go:generate points back at refs/heads/main, and ArcadeAI/monorepo#4556 merges to main, in quick succession. Once this merges, the monorepo engine's go generate check fails on any PR that lacks the new fields, until ArcadeAI/monorepo#4556 (with the stacked PR merged into it) lands on main.

🤖 Generated with Claude Code

wdawson and others added 3 commits September 24, 2026 12:59
A remote MCP server's result can carry content blocks alongside its
structured result, and MCP clients receive that text. A post hook that
sees only `output` cannot redact or scan it. Add optional `content` to
PostHookRequest and PostHookOverride, as MCP content blocks in wire
shape. An absent override forwards the request's content unchanged, the
same as `output`. The fields are additive and optional, so hook servers
that ignore them keep working. Bump the contract to 1.2.0-beta.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Spec-defined fields are forwarded, but a resource_link block may arrive
without title, size, icons, or _meta, and fields outside the MCP
specification may be dropped. `content` is also absent on error
results, whose text arrives in `execution_error`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…-28 spec

An empty `override.content` removes every upstream block, and MCP
clients then receive `output` rendered as a single text block. The
ContentBlock description now links the 2026-07-28 tools specification.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@wdawson
wdawson marked this pull request as ready for review September 24, 2026 23:05
@wdawson
wdawson requested a review from sdreyer September 24, 2026 23:05
Comment thread logic_extensions/http/1.0/schema.yaml Resolved
Comment thread logic_extensions/http/1.0/schema.yaml Resolved
…eutral

`content` is Arcade's protocol-neutral content-block format. It follows
MCP's content-block model, so MCP tooling and documentation apply, and
content a server returns in another protocol would be converted into
it. Remote MCP servers are its only source today. The MCP link stays as
the block definitions the format follows.

Wording only. The JSON shape and every semantic are unchanged, and the
version stays 1.2.0-beta.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@wdawson
wdawson requested a review from sdreyer September 24, 2026 23:49
@wdawson
wdawson merged commit 2095e8a into main Sep 28, 2026
1 check passed
@wdawson
wdawson deleted the wils/post-hook-content branch September 28, 2026 19:18
wdawson added a commit to ArcadeAI/docs that referenced this pull request Sep 28, 2026
…90] (#1217)

Post-hook requests now include `content`, the blocks a remote MCP server returned alongside its result, and hooks can replace them with `override.content` (ArcadeAI/monorepo#4556, ArcadeAI/schemas#31). The Contextual Access guides now document both fields, and note that a hook that redacts `output` should redact `content` too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants