Skip to content

Commit 8d7aa66

Browse files
committed
also update res to reosurce
1 parent 6af5810 commit 8d7aa66

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/strands/tools/mcp/mcp_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -455,17 +455,17 @@ def _map_mcp_content_to_tool_result_content(
455455
}
456456
elif isinstance(content, MCPEmbeddedResource):
457457
self._log_debug_with_thread("mapping MCP embedded resource content")
458-
res = getattr(content, "resource", None)
459-
if res is None:
458+
resource = getattr(content, "resource", None)
459+
if resource is None:
460460
self._log_debug_with_thread("embedded resource has no 'resource' field - dropping")
461461
return None
462462

463463
# Support both pydantic model and dict access
464464
def _get(attr: str) -> Any:
465-
if hasattr(res, attr):
466-
return getattr(res, attr)
467-
if isinstance(res, dict):
468-
return res.get(attr)
465+
if hasattr(resource, attr):
466+
return getattr(resource, attr)
467+
if isinstance(resource, dict):
468+
return resource.get(attr)
469469
return None
470470

471471
text_val = _get("text")

0 commit comments

Comments
 (0)