Skip to content

fix(adk): extract text from MCP embedded resource content blocks - #2541

Open
mesutoezdil wants to merge 4 commits into
kagent-dev:mainfrom
mesutoezdil:fix/mcp-embedded-resource-content
Open

fix(adk): extract text from MCP embedded resource content blocks#2541
mesutoezdil wants to merge 4 commits into
kagent-dev:mainfrom
mesutoezdil:fix/mcp-embedded-resource-content

Conversation

@mesutoezdil

Copy link
Copy Markdown
Contributor

extractFunctionResponseContent only reads the top-level text field on each MCP content item. Embedded resource blocks (type: resource) carry their text under resource.text instead, so those blocks were silently dropped and the model never saw that part of the tool result. Falls back to resource.text when no top-level text field is present.

extractFunctionResponseContent only read the top-level text field on
each content item, so type: resource blocks (text nested under
resource.text) were silently dropped from what the model sees.

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
@github-actions github-actions Bot added the bug Something isn't working label Aug 24, 2026
…urce-content

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
…urce-content

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
…urce-content

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant