MCPcopy Create free account

hub / github.com/anthropics/anthropic-sdk-python / endpoints

Endpoints93 in github.com/anthropics/anthropic-sdk-python

Routeedit
beta_async_tool(name="edit", input_schema=BetaManagedAgentsAgentToolset20260401EditInput)
src/anthropic/lib/tools/agent_toolset.py:None
Routeglob
beta_async_tool(name="glob", input_schema=BetaManagedAgentsAgentToolset20260401GlobInput)
src/anthropic/lib/tools/agent_toolset.py:None
Routegrep
beta_async_tool(name="grep", input_schema=BetaManagedAgentsAgentToolset20260401GrepInput)
src/anthropic/lib/tools/agent_toolset.py:None
Routeread
beta_async_tool(name="read", input_schema=BetaManagedAgentsAgentToolset20260401ReadInput)
src/anthropic/lib/tools/agent_toolset.py:None
Routetest_a_runner_made_from_params_raises_the_errors_of_tool_runner
pytest.mark.parametrize( ("bad_fields", "wrong_flavour", "error"), [ ({"thread": {"type": "cre
tests/lib/tools/test_runners.py:None
Routetest_action_appends_its_events_to_the_log
cases( "before, step, appended", turn=([], (0, "start_turn"), [*RUNNING, "user.message"]), subagen
tests/lib/tools/test_fake_sessions_api.py:None
Routetest_action_that_the_api_cannot_take_is_disabled
cases( "before, step", subagent_with_no_turn=([], (0, "start_turn", CHILD)), call_with_no_turn=([]
tests/lib/tools/test_fake_sessions_api.py:None
Routetest_an_unreadable_subdirectory_fails_the_pass_instead_of_reading_as_deletions
pytest.mark.skipif(os.geteuid() == 0, reason="permission checks do not bind root")
tests/lib/tools/memory_sync/test_delete_discipline.py:None
Routetest_asks_confirm_before_a_call_runs_while_the_reply_streams
pytest.mark.parametrize("family", ["computer", "browser"])
tests/lib/tools/test_runner_eager_toolsets.py:None
Routetest_async_tool_result_rejects_block_of_another_family
pytest.mark.parametrize("toolset_name", [None, "computer"])
tests/lib/tools/toolsets/test_runnable.py:None
Routetest_bash_returns_the_output_and_says_if_the_shell_is_gone
pytest.mark.parametrize( ("command", "output", "is_error", "keeps_shell"), [ ("echo out; echo
tests/lib/tools/test_agent_toolset.py:None
Routetest_call_that_the_session_no_longer_waits_on_is_neither_run_nor_yielded
cases( "calls, then", result=((A_FOR_10S, B), [("send_result", "b"), ("process_input",)]), custom_
tests/lib/tools/test_session_runner.py:None
Routetest_call_waits_for_a_sign_that_the_server_answered_an_earlier_call
cases( "steps, started_at", result=([*emitting(REFUSED_A, B), (5, "write_server_result")], 5), rec
tests/lib/tools/test_session_runner.py:None
Routetest_cancelled_tool_posts_what_it_returns_or_else_that_it_was_stopped
cases( "fn, posted", returned=(once_cancelled(returning("partial")), ([text("partial")], False)),
tests/lib/tools/test_session_runner.py:None
Routetest_change_after_a_stopped_call_is_sent
pytest.mark.parametrize( "steps, files", [ param([(4, "interrupt"), *REPLACED], {"new.md": "ne
tests/lib/tools/memory_sync/test_e2e_memory.py:None
Routetest_consumer_cancelled_during_a_backoff_or_a_read_exits_at_once
pytest.mark.parametrize("at", [2.2, 3, 5, 7], ids=["backoff", "stream", "get", "list"])
tests/lib/tools/test_session_runner.py:None
Routetest_count_tokens
pytest.mark.parametrize("body", [{}, {"input_tokens": None}, {"input_tokens": "12"}], ids=str)
tests/test_open_telemetry.py:None
Routetest_countdown_continues_after_events_that_give_the_runner_no_call_to_run
cases( "steps, ended", session_updated=([*ENDED_TURN, (30, "emit_other_event", "session.updated")], 60
tests/lib/tools/test_session_runner.py:None
Routetest_countdown_starts_when_the_last_call_has_finished
cases( "steps, ended", interrupted_call=([*requiring_action(Call("a", seconds=100)), (50, "interrupt")
tests/lib/tools/test_session_runner.py:None
Routetest_date_parsing
pytest.mark.parametrize( "value,result", [ # Valid inputs ("1494012444.883309", date(2
tests/test_utils/test_datetime_parse.py:None
Routetest_datetime_parsing
pytest.mark.parametrize( "value,result", [ # Valid inputs # values in seconds
tests/test_utils/test_datetime_parse.py:None
Routetest_denied_call_is_not_yielded_when_its_thread_terminated_its_result_came_first_or_it_is_an_mcp_call
cases( "steps", thread_terminated=[*DENIED_IN_CHILD, (0, "terminate_thread")], denied_after_its_re
tests/lib/tools/test_session_runner.py:None
Routetest_denied_call_is_yielded_once_although_the_session_no_longer_waits_on_it
cases( "steps, yielded_at", by_the_user_in_history=([*requiring_action(ASK_A), *timed(0, DENY_A_AND_EN
tests/lib/tools/test_session_runner.py:None
Routetest_docstring_parsing_with_parameters
pytest.mark.parametrize( "docstring", [ pytest.param( (
tests/lib/tools/test_functions.py:None
Routetest_does_not_run_a_call_that_confirm_declines_or_the_toolsets_calls_after_it
pytest.mark.parametrize("family", ["computer", "browser"])
tests/lib/tools/test_runner_eager_toolsets.py:None
Routetest_empty_output_is_recorded_as_the_text_that_is_sent
pytest.mark.parametrize("output", [None, "", [], [{"type": "text", "text": "", "citations": []}]])
tests/lib/tools/test_open_telemetry.py:None
Routetest_every_turn_and_a_thread_built_from_params_send_the_output_config_given_at_creation
pytest.mark.parametrize( "fields", [ pytest.param( {"output_format
tests/lib/threads/test_beta_threads.py:None
Routetest_exception_that_is_not_an_api_failure_interrupts_iteration_and_propagates_after_cleanup
cases( "steps, output, error, order", reading=([(1, "close_stream", "bug")], "ok", ZeroDivisionError,
tests/lib/tools/test_session_runner.py:None
Routetest_failed_connection_is_retried_with_backoff_before_anything_runs
pytest.mark.parametrize("kind", ["stream", "list", "get"])
tests/lib/tools/test_session_runner.py:None
Routetest_filestore_listings_raise_on_an_unreadable_subdirectory
pytest.mark.skipif(os.geteuid() == 0, reason="permission checks do not bind root")
tests/lib/tools/test_file_store.py:None
Routetest_filestore_open_raises_on_an_unreadable_mount_path
pytest.mark.skipif(os.geteuid() == 0, reason="permission checks do not bind root")
tests/lib/tools/test_file_store.py:None
Routetest_function_call_with_invalid_input
pytest.mark.parametrize( "input_data, expected_error_type, expected_error_msg", [
tests/lib/tools/test_functions.py:None
Routetest_grep_walk_works_without_interval_timers
pytest.mark.parametrize("error", [AttributeError, getattr(signal, "ItimerError", OSError)], ids=["windows", "r
tests/lib/tools/test_agent_toolset.py:None
Routetest_handle_item_stops_the_item_and_raises_its_failure
pytest.mark.parametrize( "steps, options, error, message", [ param([], {"tools": broken_tools}
tests/lib/environments/test_worker.py:None
Routetest_history_is_paged_and_can_end_with_the_pending_input
cases( "page, lists_pending, listed, next_page", first_page=("0", True, RUNNING, "2"), last_page=(
tests/lib/tools/test_fake_sessions_api.py:None
Routetest_interpolation
pytest.mark.parametrize( "template, kwargs, expected", [ ("/v1/{id}", dict(id="abc"), "/v1/abc
tests/test_utils/test_path.py:None
Routetest_item_is_stopped_when_its_session_ends_or_the_worker_is_cancelled
pytest.mark.parametrize("ending", [("terminate",), ("archive",), ("delete",), ("cancel", "a")], ids=itemgetter
tests/lib/environments/test_worker.py:None
Routetest_item_that_fails_is_stopped_and_polling_continues
pytest.mark.parametrize( "steps, options", [ param([], {"tools": broken_tools}, id="tools_fact
tests/lib/environments/test_worker.py:None
Routetest_iteration_ends_with_no_error_when_the_session_ends
cases( "end, ended", terminated=((1, "terminate"), 1), archived=((1, "archive"), 1), deleted=(
tests/lib/tools/test_session_runner.py:None
Routetest_keeps_pydantic_literals
pytest.mark.skipif(PYDANTIC_V1, reason="structured outputs not supported with pydantic v1")
tests/lib/_parse/test_transform.py:None
Routetest_last_change_is_sent_once_when_an_idle_session_is_done
pytest.mark.parametrize( "steps, options, received", [ param([edit(5, "last")], {}, updated("n
tests/lib/tools/memory_sync/test_e2e_memory.py:None
Routetest_model_schema_generated_once_and_not_shared_between_calls
pytest.mark.skipif(PYDANTIC_V1, reason="structured outputs not supported with pydantic v1")
tests/lib/_parse/test_transform.py:None
Routetest_never_runs_the_call_that_was_cut_off_by
pytest.mark.parametrize( "cut_off_reply", [ pytest.param(lambda: reply_ending("refusal", call(
tests/lib/tools/test_runner_eager_tools.py:None
Routetest_no_call_starts_while_disconnected
pytest.mark.parametrize("failing", ["stream", "get", "list"])
tests/lib/tools/test_session_runner.py:None
Routetest_nothing_is_logged_as_failed_for_a_cancelled_consumer_or_an_idle_stop
pytest.mark.parametrize("until", [0.5, 1.5, 2.5, 5, 1000], ids=["stream", "get", "list", "tool", "idle_stop"])
tests/lib/tools/test_session_runner.py:None
Routetest_nothing_runs_and_iteration_ends_after_one_connection_to_an_ended_session
pytest.mark.parametrize( "end, requests", [("terminate", ["stream", "get", "list"]), ("archive", ["str
tests/lib/tools/test_session_runner.py:None
Routetest_oracle_reports_a_runner_with_other_settings_than_it_expects
pytest.mark.parametrize( "steps, options, violation", [ (ENDED_TURN, {"max_idle": 10}, "closed
tests/lib/tools/test_session_runner_properties.py:None
Routetest_oracle_reports_a_wrong_action
pytest.mark.parametrize( "steps, actions, violation", [ param([], [*CLAIM, ("read_with_key",)]
tests/lib/environments/test_worker_properties.py:None
Routetest_oracle_reports_a_wrong_action
pytest.mark.parametrize( "steps, actions, violation", [ (requiring_action(ASK_A), [CONNECT, CA
tests/lib/tools/test_session_runner_properties.py:None
Routetest_oracle_reports_a_wrong_yield
pytest.mark.parametrize( "steps, options, violation", [ (requiring_action(A), yielding(UNCHANG
tests/lib/tools/test_session_runner_properties.py:None
Routetest_output_format_adds_no_beta_beyond_the_threads_beta
pytest.mark.parametrize( "fields", [ pytest.param( {"output_format
tests/lib/threads/test_beta_threads.py:None
Routetest_output_format_schema_not_shared_between_calls
pytest.mark.skipif(PYDANTIC_V1, reason="structured outputs not supported with pydantic v1")
tests/lib/_parse/test_transform.py:None
Routetest_params_includes_the_output_format
pytest.mark.skipif(PYDANTIC_V1, reason="structured outputs not supported with pydantic v1")
tests/lib/threads/test_beta_threads.py:None
Routetest_parse_caller_beta_header_overrides
pytest.mark.skipif(_compat.PYDANTIC_V1, reason="parse() response post-parser is pydantic-v2 only")
tests/lib/test_stainless_helpers.py:None
Routetest_parse_continues_the_thread_and_parses_each_reply
pytest.mark.skipif(PYDANTIC_V1, reason="structured outputs not supported with pydantic v1")
tests/lib/threads/test_beta_threads.py:None
Routetest_parse_continues_the_thread_and_parses_each_reply
pytest.mark.skipif(PYDANTIC_V1, reason="structured outputs not supported with pydantic v1")
tests/lib/threads/test_async_beta_threads.py:None
Routetest_parse_gets_the_fallback
pytest.mark.skipif(PYDANTIC_V1, reason="parse() response post-parser is pydantic-v2 only")
tests/lib/test_refusal_fallback.py:None
Routetest_parse_merges_caller_extra_headers
pytest.mark.skipif(_compat.PYDANTIC_V1, reason="parse() response post-parser is pydantic-v2 only")
tests/lib/test_stainless_helpers.py:None
Routetest_parse_of_a_reply_that_does_not_fit_the_output_format_keeps_the_turn
pytest.mark.skipif(PYDANTIC_V1, reason="structured outputs not supported with pydantic v1")
tests/lib/threads/test_beta_threads.py:None
Routetest_parse_of_a_reply_that_does_not_fit_the_output_format_keeps_the_turn
pytest.mark.skipif(PYDANTIC_V1, reason="structured outputs not supported with pydantic v1")
tests/lib/threads/test_async_beta_threads.py:None
Routetest_parse_sends_single_header_line
pytest.mark.skipif(_compat.PYDANTIC_V1, reason="parse() response post-parser is pydantic-v2 only")
tests/lib/test_stainless_helpers.py:None
Routetest_parse_without_output_format_returns_no_parsed_output
pytest.mark.skipif(PYDANTIC_V1, reason="parse() response post-parser is pydantic-v2 only")
tests/lib/threads/test_beta_threads.py:None
Routetest_parsed_reply_has_the_request_and_workspace_ids_of_its_response
pytest.mark.skipif(PYDANTIC_V1, reason="parse() response post-parser is pydantic-v2 only")
tests/lib/threads/test_beta_threads.py:None
Routetest_parsed_reply_has_the_request_and_workspace_ids_of_its_response
pytest.mark.skipif(PYDANTIC_V1, reason="parse() response post-parser is pydantic-v2 only")
tests/lib/threads/test_async_beta_threads.py:None
Routetest_parts_and_the_cut_of_the_last_text_part_are_measured_in_bytes
pytest.mark.parametrize( ("limit", "input_parts", "output_characters", "size"), [
tests/test_open_telemetry.py:None
Routetest_public_name_is_exported_from_the_environments_package
pytest.mark.parametrize( "name", [ "BetaAnyRunnableTool", "DEFAULT_MAX_IDLE",
tests/lib/tools/test_session_runner.py:None
Routetest_read_refused_permanently_is_raised
pytest.mark.parametrize( "kind, requests", [("stream", ["stream"]), ("get", ["stream", "get"]), ("list", [
tests/lib/tools/test_session_runner.py:None
Routetest_read_whose_body_is_not_from_the_api_reconnects
pytest.mark.parametrize("kind", ["get", "list"])
tests/lib/tools/test_session_runner.py:None
Routetest_reads_get_longer_limits_until_a_connection_succeeds
pytest.mark.parametrize("kind", ["stream", "get", "list"])
tests/lib/tools/test_session_runner.py:None
Routetest_refused_result_is_replaced_with_an_error_result
cases( "call, message", invalid_content=( Call("a", "bash", output="error_image"), "Th
tests/lib/tools/test_session_runner.py:None
Routetest_request_is_retried_as_the_client_is_configured_to
pytest.mark.parametrize( "kind, retry_counts", [ ("stream", ["0", "1", "0", "0", "0"]),
tests/lib/tools/test_session_runner.py:None
Routetest_result_is_kept_only_for_a_call_that_is_unresolved_and_allowed
cases( "steps, fields, status, pending", waited_on=(requiring_action(A), {}, 200, ["user.tool_result"]
tests/lib/tools/test_fake_sessions_api.py:None
Routetest_running_tool_is_cancelled_when_the_session_stops_accepting_its_result
cases( "steps, at", interrupted=([*requiring_action(A_FOR_10S), (1, "interrupt")], 1), another_res
tests/lib/tools/test_session_runner.py:None
Routetest_runs_that_behave_differently_are_observably_different
cases( "difference", no_start=[(0, "send_result", "a")], another_post=[(0, "fail", "send", 503)],
tests/lib/tools/test_session_runner_properties.py:None
Routetest_runs_the_calls_while_the_caller_reads_the_stream_however_it_reads_it
pytest.mark.parametrize("read", ["events", "text_stream", "get_final_message", "until_done"])
tests/lib/tools/test_runner_eager_tools.py:None
Routetest_span_has_an_attribute_only_when_the_event_has_it
cases( "call, name, recorded", thread=(Call("a", thread=CHILD), "anthropic.session.thread.id",
tests/lib/tools/test_open_telemetry.py:None
Routetest_span_of_a_failed_tool_has_the_error_status
pytest.mark.parametrize("call", [Call("a", output="raise"), Call("a", seconds=500)], ids=["raised", "timed_out
tests/lib/tools/test_open_telemetry.py:None
Routetest_span_status_matches_how_the_item_ended
pytest.mark.parametrize( "steps, options, status, error_type", [ param(ENDED_TURN, {}, StatusC
tests/lib/environments/test_worker.py:None
Routetest_starts_a_toolset_call_once_the_model_has_moved_on_from_it
pytest.mark.parametrize("family", ["computer", "browser"])
tests/lib/tools/test_runner_eager_toolsets.py:None
Routetest_state_of_the_item
pytest.mark.parametrize( "steps, actions, variant, state, delivery", [ param([], [*CLAIM, ("st
tests/lib/environments/test_fake_work_api.py:None
Routetest_stops_max_idle_after_the_turn_ends_and_the_session_is_read_again
cases( "end", end_turn=("end_turn", PRIMARY, "end_turn"), refusal=("end_turn", PRIMARY, "refusal")
tests/lib/tools/test_session_runner.py:None
Routetest_stream_delivers_the_appends_that_its_faults_let_through
cases( "steps, received", in_order=([EMIT_X, EMIT_Y], ["x", "y"]), lost=([(0, "lose"), EMIT_X, EMI
tests/lib/tools/test_fake_sessions_api.py:None
Routetest_symlink_escape_after_dangling_symlink_is_rejected
pytest.mark.parametrize( ("make_tool", "tool_input"), [ (beta_read_tool, {"file_path": "spelle
tests/lib/tools/test_agent_toolset.py:None
Routetest_sync_matrix
pytest.mark.parametrize( ("name", "local", "remote", "disk", "store", "sent"), [ # baseline "v
tests/lib/tools/memory_sync/test_memory_sync.py:None
Routetest_the_output_format_is_given_only_when_the_thread_is_created
pytest.mark.parametrize("field", ["output_config", "output_format"])
tests/lib/threads/test_beta_threads.py:None
Routetest_thread_rejects_both_output_format_and_output_config_format
pytest.mark.skipif(PYDANTIC_V1, reason="structured outputs not supported with pydantic v1")
tests/lib/threads/test_beta_threads.py:None
Routetest_tool_output_is_posted_as_session_content
cases( "returned, posted", string=("hello", [text("hello")]), none=(None, [text("(no output)")]),
tests/lib/tools/test_session_runner.py:None
Routetest_tool_result_rejects_block_of_another_family
pytest.mark.parametrize("toolset_name", [None, "computer"])
tests/lib/tools/toolsets/test_runnable.py:None
Routetest_turn_ends_when_the_server_writes_its_results_after_those_of_the_runner
cases( "calls, input, started", web_search=((replace(SERVERS_A, name="web_search"), B), [], ["b"]),
tests/lib/tools/test_session_runner.py:None
Routetest_usage_fields_are_all_recorded_or_left_out
pytest.mark.parametrize( ("usage", "recorded", "without_an_attribute"), [ (Usage, USAGE_FIELDS
tests/test_open_telemetry.py:None
Routetest_view_result_file_types_all_keep_or_lose_their_content
pytest.mark.parametrize( "view_result", [ TextEditorCodeExecutionViewResultBlock, Text
tests/test_open_telemetry.py:None
Routetest_writes_are_uploaded_and_deletions_are_not_sent_after_an_unclean_end
pytest.mark.parametrize( "ending", [ param([(20, "cancel", "a")], id="cancelled"), par
tests/lib/tools/memory_sync/test_e2e_memory.py:None
Routewrite
beta_async_tool(name="write", input_schema=BetaManagedAgentsAgentToolset20260401WriteInput)
src/anthropic/lib/tools/agent_toolset.py:None