mirror of
https://github.com/jwadow/kiro-gateway.git
synced 2026-04-25 01:15:57 +03:00
[GH-ISSUE #50] Bug: MCP tool results return "(empty result)" due to Pydantic model handling in extract_text_content() #31
Labels
No labels
bug
bug
enhancement
enhancement
fixed
fixed
invalid
needs-info
needs-testing
pull-request
question
upstream
wontfix
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/kiro-gateway-jwadow#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bhaskoro-muthohar on GitHub (Jan 21, 2026).
Original GitHub issue: https://github.com/jwadow/kiro-gateway/issues/50
Description
MCP tool results are being converted to
"(empty result)"instead of preserving the actual content. This affects all MCP servers that return tool results in the standard format[{"type": "text", "text": "..."}].Root Cause
When Claude Code sends MCP tool results, the content comes as:
Pydantic parses this into:
However,
extract_text_content()inkiro/converters_core.pyonly handlesdictandstrtypes:Since
TextContentBlockis a Pydantic model (not a dict), the content is not extracted, resulting in an empty string that falls back to"(empty result)".Steps to Reproduce
"(empty result)"instead of actual dataTest Case
Proposed Fix
Add handling for Pydantic models in
extract_text_content()(around line 143):Impact
Environment
@jwadow commented on GitHub (Jan 23, 2026):
@bhaskoro-muthohar Your analysis was perfect. Fixed by adding Pydantic model handling to
extract_text_content():Added you to CONTRIBUTORS.md