Skip to content

Docs: show post-call inspection of tool text results - #5385

Merged
jlowin merged 2 commits into
PrefectHQ:mainfrom
Amazinghorseli:codex/docs-inspect-text-results-5055
Oct 4, 2026
Merged

jlowin merged 2 commits into
PrefectHQ:mainfrom
Amazinghorseli:codex/docs-inspect-text-results-5055

Conversation

@Amazinghorseli

@Amazinghorseli Amazinghorseli commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Adds a custom middleware example that inspects text blocks in a ToolResult, preserves non-text blocks, surfaces inspection failures, and clarifies that server middleware cannot inspect client-side model activity. Fixes #5055.

🤖 AI-assisted with OpenAI Codex.

Co-authored-by: Roli Bosch roli@hermes-labs.ai

AI-assisted with OpenAI Codex
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

This pull request is awaiting maintainer assignment. Linked PRs stay open while maintainers triage the issue; this check remains failing until assignment.

Per CONTRIBUTING.md, an external PR must reference an issue that's assigned to its author. To get there:

  1. A maintainer will review the issue and decide whether to assign you. Please don't comment just to request assignment.

Once you're assigned and the link is present, this check is re-run automatically. Previously gate-closed PRs also reopen — no further action needed.

Maintainers: reopen this PR or remove the missing-issue-link label to bypass this check.

@marvin-context-protocol marvin-context-protocol Bot added documentation Updates to docs, examples, or guides. Primary change is documentation-related. server Related to FastMCP server implementation or server-side functionality. labels Oct 2, 2026

@jlowin jlowin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I adjusted the example to reject failed text checks and preserve accepted results unchanged, with an explicit text-only scope. This avoids implying that rewriting text sanitizes structured or raw results.

@jlowin

jlowin commented Oct 4, 2026

Copy link
Copy Markdown
Member

Reviewed at ce16d301696fb5badd2b243d9aba19005ec607d2, with passing code CI and no unresolved findings. Merging.

@jlowin
jlowin merged commit ffdde6d into PrefectHQ:main Oct 4, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Updates to docs, examples, or guides. Primary change is documentation-related. missing-issue-link server Related to FastMCP server implementation or server-side functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: show post-call inspection of text tool results in custom middleware

2 participants