MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / result_blocks

Function result_blocks

tests/test_open_telemetry.py:8289–8296  ·  view source on GitHub ↗

The result blocks of server tools and MCP tools in the unions of content blocks.

(*unions: Any)

Source from the content-addressed store, hash-verified

8287
8288
8289def result_blocks(*unions: Any) -> list[Any]:
8290 """The result blocks of server tools and MCP tools in the unions of content blocks."""
8291 return [
8292 member
8293 for union in unions
8294 for member in union_members(union)
8295 if any(name.endswith("_tool_result") and name != "tool_result" for name in type_names(member))
8296 ]
8297
8298
8299USAGE_FIELDS_RECORDED = {

Calls 2

union_membersFunction · 0.85
type_namesFunction · 0.85

Tested by

no test coverage detected