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

Function result_blocks

tests/test_open_telemetry.py:8291–8298  ·  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

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

Calls 2

union_membersFunction · 0.85
type_namesFunction · 0.85

Tested by

no test coverage detected