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

Method result

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

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls

Tested by

no test coverage detected