Skip to content

Commit 3fc0cbb

Browse files
committed
also update res to reosurce
1 parent cac1690 commit 3fc0cbb

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
@@ -413,17 +413,17 @@ def _map_mcp_content_to_tool_result_content(
413413
}
414414
elif isinstance(content, MCPEmbeddedResource):
415415
self._log_debug_with_thread("mapping MCP embedded resource content")
416-
res = getattr(content, "resource", None)
417-
if res is None:
416+
resource = getattr(content, "resource", None)
417+
if resource is None:
418418
self._log_debug_with_thread("embedded resource has no 'resource' field - dropping")
419419
return None
420420

421421
# Support both pydantic model and dict access
422422
def _get(attr: str) -> Any:
423-
if hasattr(res, attr):
424-
return getattr(res, attr)
425-
if isinstance(res, dict):
426-
return res.get(attr)
423+
if hasattr(resource, attr):
424+
return getattr(resource, attr)
425+
if isinstance(resource, dict):
426+
return resource.get(attr)
427427
return None
428428

429429
text_val = _get("text")

0 commit comments

Comments
 (0)