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

Method result

tests/test_open_telemetry.py:6061–6072  ·  view source on GitHub ↗
(tool_use_id: str, stdout: str)

Source from the content-addressed store, hash-verified

6059 @pytest.mark.respx(base_url=base_url)
6060 def test_size_bound_counts_a_result_that_is_one_object(self, spans: Spans, respx_mock: MockRouter) -> None:
6061 def result(tool_use_id: str, stdout: str) -> dict[str, Any]:
6062 return {
6063 "type": "code_execution_tool_result",
6064 "tool_use_id": tool_use_id,
6065 "content": {
6066 "type": "code_execution_result",
6067 "stdout": stdout,
6068 "stderr": "",
6069 "return_code": 0,
6070 "content": [],
6071 },
6072 }
6073
6074 big = "x" * 600_000
6075 response = {**MESSAGE, "content": [{"type": "text", "text": "Done"}, result("srvtoolu_2", big)]}

Calls

no outgoing calls

Tested by

no test coverage detected