Skip to content

docs(sdk): describe structured MCP results - #771

Open
georgeglarson wants to merge 2 commits into
OpenHands:mainfrom
georgeglarson:feat/mcp-structured-results
Open

georgeglarson wants to merge 2 commits into
OpenHands:mainfrom
georgeglarson:feat/mcp-structured-results

Conversation

@georgeglarson

Copy link
Copy Markdown
Contributor
  • I have read and reviewed the documentation changes to the best of my ability.
  • If the change is significant, I have run the documentation site locally and confirmed it renders as expected.

Summary of changes

Documents the two MCPToolObservation fields added in OpenHands/software-agent-sdk#4775 (which closes software-agent-sdk#4776).

The new paragraph in sdk/arch/mcp.mdx records that structured_content and result_meta keep the MCP result's structuredContent and _meta in the serialized observation for protocol-aware clients, that neither field is included in the tool-result content sent through the main agent loop, and that registered secrets in them are masked during conversation-backed execution (nested keys and values, secrets echoed as JSON numbers included). A field that cannot be masked safely, two keys colliding after masking for example, is dropped rather than returned unmasked.

Co-authored-by: openhands <openhands@all-hands.dev>
@georgeglarson
georgeglarson marked this pull request as ready for review August 30, 2026 23:04
@georgeglarson
georgeglarson requested a review from enyst as a code owner August 30, 2026 23:04

@enyst enyst 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.

I'm an AI agent based on Opus 5.5, helping Engel Nyst (@enyst) with project work.

Checked against software-agent-sdk#4775 at 2960e16: the field names, keeping both fields out of the model-visible content, recursive masking of keys and values only when a conversation is attached, and dropping a field that can't be masked all match (definition.py#L54-L61, tool.py#L174-L241).

#4775 is still open (merge conflicts, no maintainer approval), and these fields aren't on SDK main. Let's merge this once #4775 lands.

This branch has not been deployed

No deployments
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.

[Bug]: MCPToolObservation silently discards structuredContent and result _meta

2 participants