MCPcopy Create free account

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

Functions13,873 in github.com/anthropics/anthropic-sdk-python

↓ 8 callersMethodvalidate_archive
Check whether a plugin marketplace, uploaded as a `.zip` of the marketplace directory, would synchronize into claude.ai, without conn
src/anthropic/resources/beta/organization/plugin_marketplaces.py:312
↓ 8 callersMethodvalidate_repository
Check whether a plugin marketplace held in a public GitHub repository would synchronize into claude.ai, without connecting or storing
src/anthropic/resources/beta/organization/plugin_marketplaces.py:413
↓ 8 callersMethodwait
(self, context: BetaToolsetCallContext, input: BetaBrowserWaitInput)
src/anthropic/lib/tools/_toolsets/_browser.py:402
↓ 7 callersFunction_async_compact_runner
( client: AsyncAnthropic, *, context_management: Union[BetaContextManagementConfigParam, Omit] = o
tests/lib/tools/test_runners.py:2552
↓ 7 callersFunction_async_weather_tool
()
tests/lib/tools/test_runners.py:2521
↓ 7 callersFunction_downloaded
A `SessionMemoryStores` with one store already downloaded to disk.
tests/lib/tools/memory_sync/test_keep_only_copy.py:21
↓ 7 callersMethod_ensure_memory_root
Ensure the memory root directory exists
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:682
↓ 7 callersFunction_error_text
(desktop: FakeDesktop, name: str, input: dict[str, Any])
tests/lib/tools/toolsets/test_computer_pipeline.py:53
↓ 7 callersFunction_get_weather
(location: str, units: Literal["c", "f"])
tests/lib/tools/test_runners.py:2429
↓ 7 callersFunction_mcp_field_v1_or_v2
(obj: Any, name: str)
src/anthropic/lib/tools/mcp.py:80
↓ 7 callersFunction_message
(*blocks: dict[str, Any], stop: str = "tool_use")
tests/lib/tools/toolsets/test_computer_runner.py:40
↓ 7 callersFunction_mock_client
(result: CallToolResult | None = None)
tests/lib/tools/test_mcp_tool.py:67
↓ 7 callersFunction_mock_token_endpoint
(respx_mock: MockRouter)
tests/lib/test_credentials.py:2391
↓ 7 callersFunction_read_result
(contents: list[Any])
tests/lib/tools/test_mcp_tool.py:51
↓ 7 callersFunction_requests
(respx_mock: MockRouter)
tests/lib/tools/toolsets/test_computer_runner.py:63
↓ 7 callersFunction_set_ambient_first_party_credentials
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:138
↓ 7 callersFunction_text_resource
(uri: str = "file:///x.txt", text: str = "hello", mime: str | None = None)
tests/lib/tools/test_mcp_tool.py:43
↓ 7 callersFunction_use
(name: str, input: dict[str, Any], id: str = "toolu_1")
tests/lib/tools/toolsets/test_computer_pipeline.py:49
↓ 7 callersMethod_validate_path
Validate and resolve memory paths
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:400
↓ 7 callersFunction_within
True if `child` is `root` or a path inside it (both already resolved). Names compare exactly: on Windows `relative_to` lowercases them first,
src/anthropic/lib/tools/_skills.py:41
↓ 7 callersMethodaclose
(self)
src/anthropic/_tracing.py:606
↓ 7 callersFunctionapplication_trace_context
Runs with a sampled span and a baggage entry current, as an instrumented application calls the SDK.
tests/test_open_telemetry.py:4122
↓ 7 callersFunctionb64_obj
(data: object)
tests/test_prepare.py:121
↓ 7 callersFunctionbeta_agent_toolset_20260401
Return the `agent_toolset_20260401` implementations bound to `ctx`. The result is a plain list of `anthropic.lib.tools.BetaAsyncFunctionTool`
src/anthropic/lib/tools/agent_toolset.py:1252
↓ 7 callersFunctionbeta_glob_tool
(ctx: AgentToolContext)
src/anthropic/lib/tools/agent_toolset.py:1090
↓ 7 callersFunctionbeta_headers
(respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:117
↓ 7 callersFunctioncached_json_schema
`adapter.json_schema()`, cached. Callers share the dict, so `transform_schema()` copies from it.
src/anthropic/lib/_parse/_transform.py:99
↓ 7 callersMethodcopy
Create a new client instance re-using the same options given to the current client with optional overriding. A credential passed her
src/anthropic/_client.py:855
↓ 7 callersMethodend
Ends the span, unless it has ended. The status stays unset when `error` is a cancellation, and when the consumer stopped before it `f
src/anthropic/lib/_tracing/_work.py:54
↓ 7 callersMethodexecute
(self, context: BetaToolsetCallContext, name: Any, input: Any)
tests/lib/tools/toolsets/test_interface.py:139
↓ 7 callersMethodextra_headers
Return headers derived from the config file (e.g. `workspace_id`). Eagerly reads the config if not yet loaded. The returned dict is s
src/anthropic/lib/credentials/_providers.py:289
↓ 7 callersFunctionextract_type_var_from_base
Given a type like `Foo[T]`, returns the generic type variable `T`. This also handles the case where a concrete subclass is given, e.g. ```py
src/anthropic/_utils/_typing.py:91
↓ 7 callersFunctionfield_types
(cls: Any)
tests/test_open_telemetry.py:8245
↓ 7 callersFunctionhttp_client
( client_class: ClientClass, transport: httpx2.MockTransport | None = None )
tests/lib/test_client_copy.py:186
↓ 7 callersFunctionmarker_stamp
(local: Path)
tests/lib/tools/memory_sync/test_folder_trust.py:28
↓ 7 callersFunctionquoted_name
A model-chosen name as it is echoed inside single quotes in a text the model reads: one line, cut short, and without the quotes and runs of spaces
src/anthropic/lib/tools/_toolsets/_sanitize.py:69
↓ 7 callersMethodread
Read and return the binary response content.
src/anthropic/_response.py:361
↓ 7 callersFunctionresult_of
(tool: Any, **input: object)
tests/lib/tools/test_agent_toolset.py:972
↓ 7 callersFunctionsaved_path
(output: str)
tests/lib/tools/test_agent_toolset.py:1511
↓ 7 callersFunctionsession_after
(steps: list[Step], *, custom_permissions: bool = False, self_hosted: bool = False)
tests/lib/tools/test_fake_sessions_api.py:36
↓ 7 callersFunctionspan_id
(span: ReadableSpan | trace.Span)
tests/test_open_telemetry.py:214
↓ 7 callersMethodstatus
(self)
tests/lib/tools/_fake_sessions_api.py:540
↓ 7 callersFunctiontrace_id
(span: ReadableSpan)
tests/test_open_telemetry.py:220
↓ 7 callersFunctionunmarked
`marked(text)` without the marker.
tests/lib/threads/helpers.py:180
↓ 7 callersFunctionvalidate_credentials
Raise if only one of aws_access_key/aws_secret_key is provided.
src/anthropic/lib/aws/_credentials.py:7
↓ 6 callersMethod__init__
( self, *, thread: ThreadT, options: TurnOverrides | RequestOptions, t
src/anthropic/lib/tools/_beta_runner.py:179
↓ 6 callersMethod_build_workload_delegate
(self, auth: Dict[str, Any])
src/anthropic/lib/credentials/_providers.py:697
↓ 6 callersFunction_disabled
(entry: Any)
tests/lib/tools/toolsets/test_interface.py:72
↓ 6 callersFunction_keep_client_header_params
Per-request header params arrive as `Omit` when unset, which would strip a value the client itself sends (e.g. `AnthropicAWS(workspace_id=...)`, a
src/anthropic/_client.py:132
↓ 6 callersFunction_mock_deployment
Mock one deployment: its token endpoint mints `token` and its messages endpoint accepts anything. Pair with `_requests_to` to check that a cli
tests/lib/test_credentials.py:2426
↓ 6 callersFunction_mode
(p: Path)
tests/lib/tools/test_skills.py:205
↓ 6 callersFunction_on
(world: World, tab_id: str, url: str, *, active: bool = False)
tests/lib/tools/toolsets/test_enforcement.py:34
↓ 6 callersFunction_paused_server_tool_use
()
tests/lib/tools/test_runners.py:653
↓ 6 callersFunction_reject_httpx_object
`httpx` objects don't work with `httpx2`, and would otherwise fail deep inside a request.
src/anthropic/_base_client.py:161
↓ 6 callersFunction_requests_to
(respx_mock: MockRouter, base_url: str)
tests/lib/test_credentials.py:2435
↓ 6 callersFunction_sha
(content: str | bytes)
tests/lib/tools/test_file_store.py:27
↓ 6 callersFunction_sha
(content: str)
tests/lib/tools/memory_sync/_fake_anthropic.py:23
↓ 6 callersFunction_status_error
(code: int)
tests/lib/tools/memory_sync/_fake_anthropic.py:27
↓ 6 callersFunction_symlink_fixture
Workdir with two symlink cycles, a link that escapes, and a link whose target spells its way through a cycle to the escaping link.
tests/lib/tools/test_agent_toolset.py:94
↓ 6 callersMethod_tool_use_span
The span of one run of `tool` for the call `tool_use`. The result the runner sends back, an error result too, is made inside it.
src/anthropic/lib/tools/_beta_runner.py:264
↓ 6 callersMethod_toolset_refuse_if_closed
(self)
src/anthropic/lib/tools/_toolsets/_runnable.py:91
↓ 6 callersMethod_validate_path
Validate and resolve memory paths
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:686
↓ 6 callersMethod_workload_provider
(self, handler: Callable[[httpx2.Request], httpx2.Response])
tests/lib/test_credentials.py:5204
↓ 6 callersFunctionassert_http_attributes
Checks that `span` is of a `method` request to `path`, and that its route is `path` with a placeholder for each ID.
tests/test_open_telemetry.py:6956
↓ 6 callersFunctionassert_signatures_in_sync
Ensure that the signature of the second function matches the first.
src/anthropic/_utils/_reflection.py:30
↓ 6 callersFunctionbuild_headers
Fold header layers into one `httpx2.Headers`, later layers taking precedence whatever a name's casing. An `Omit` value removes the header set by
src/anthropic/_base_client.py:2803
↓ 6 callersFunctionchange
(runner: Any, _reply: Any, _tool_response: Any)
tests/lib/threads/helpers.py:569
↓ 6 callersFunctionclassify
The rule for an exception out of a member call, at the `execute` boundary and in the runner alike: a `ToolsetUsageError` propagates, a `ToolError`
src/anthropic/lib/tools/_toolsets/_runnable.py:216
↓ 6 callersMethodclose
(self)
tests/lib/test_credentials.py:4262
↓ 6 callersFunctiondefer_calls
Defers the calls with these ids, when the caller sees their blocks finish. Pass each event to what it returns.
tests/lib/tools/test_runner_eager_toolsets.py:445
↓ 6 callersFunctiondownload_session_skills
Download the skills of the session's agent and its subagents into `{workdir}/skills/<name>/`. Reads the resolved agent off `session`, and for eac
src/anthropic/lib/tools/_skills.py:202
↓ 6 callersMethodended
(self, spans: Spans, content_mode: str, *, output: bool = True)
tests/test_open_telemetry.py:7758
↓ 6 callersFunctionextract_response_type
Given a type like `APIResponse[T]`, returns the generic type variable `T`. This also handles the case where a concrete subclass is given, e.g.
src/anthropic/_response.py:867
↓ 6 callersFunctionfailing_tracing
An `open_telemetry` option whose tracer provider fails every span at `failure`.
tests/test_open_telemetry.py:7930
↓ 6 callersMethodfind
(self, context: BetaToolsetCallContext, input: BetaBrowserFindInput)
src/anthropic/lib/tools/_toolsets/_browser.py:396
↓ 6 callersMethodfinish
()
src/anthropic/lib/tools/agent_toolset.py:635
↓ 6 callersFunctionfoo
(a: str | None = None)
tests/test_required_args.py:10
↓ 6 callersFunctionget_args
(tp: type[Any])
src/anthropic/_utils/_compat.py:15
↓ 6 callersFunctionget_helper_tag
Get the helper name from an object, if any.
src/anthropic/lib/_stainless_helpers.py:96
↓ 6 callersFunctiongiven
`values` without the entries whose value is `omit` or `not_given`, or `None` for an `extra_*` request option (whose "not given" default is `None`)
src/anthropic/lib/threads/_params.py:132
↓ 6 callersFunctionhelper_header
The `x-stainless-helper: <value>` header dict, for passing into a `merge_headers` call or as `extra_headers`/`default_headers`. Typing keeps
src/anthropic/lib/_stainless_helpers.py:76
↓ 6 callersFunctionids
(tool_uses: list[Any])
tests/lib/tools/test_runner_eager_tools.py:864
↓ 6 callersFunctioniter_next
(iter: Iterator[_T] | AsyncIterator[_T])
tests/decoders/test_jsonl.py:127
↓ 6 callersFunctioniteration
An entry of a response's `usage.iterations`.
tests/test_open_telemetry.py:725
↓ 6 callersFunctionmcp_resource_to_content
Convert MCP resource contents to an Anthropic content block. Finds the first resource with a supported MIME type from the result's `contents`
src/anthropic/lib/tools/mcp.py:246
↓ 6 callersFunctionmember_calls
A reply with one `tool_use` for each call, which is its id, its name and its `toolset_name`, if it has one.
tests/lib/tools/test_open_telemetry.py:257
↓ 6 callersFunctionone_line
A page- or model-supplied text on one line the model or an operator reads: a tab's title, a download's error, a field of a member's confirmation l
src/anthropic/lib/tools/_toolsets/_sanitize.py:58
↓ 6 callersMethodparse
Like `send()`, and parses the reply against the thread's `output_format` into `parsed_output`.
src/anthropic/lib/threads/_beta_threads.py:205
↓ 6 callersFunctionprepare_request_data
Copy request params into plain data that can be serialized and re-sent. Drops `NotGiven` / `Omit` entries (`keep_top_level_omit` keeps `Omit` dir
src/anthropic/_utils/_prepare.py:47
↓ 6 callersFunctionredeemed_token
The request-body form of a redeemed credit token — the object shape, best-effort mode.
tests/lib/test_refusal_fallback_streaming.py:152
↓ 6 callersFunctionsee
(event: Any)
tests/lib/tools/test_runner_eager_toolsets.py:448
↓ 6 callersMethodstart_span
(self, name: str, *args: Any, **kwargs: Any)
tests/test_tracing.py:58
↓ 6 callersMethodstopping_since
(self, session: FakeSession)
tests/lib/tools/test_session_runner_properties.py:176
↓ 6 callersFunctiontext_part
(content: str)
tests/test_open_telemetry.py:291
↓ 6 callersFunctionto_json_output_format
The `output_config.format` param that asks for replies matching `output_format`'s JSON schema.
src/anthropic/lib/_parse/_transform.py:29
↓ 6 callersMethodto_param
Convert this response Message to a MessageParam so it can be passed back to the API as an input message, e.g. in the `messages` param.
src/anthropic/types/message.py:141
↓ 6 callersFunctiontool_spans
(spans: Spans)
tests/lib/tools/test_open_telemetry.py:309
↓ 6 callersFunctionwell_formed
`text` with each unpaired surrogate replaced by U+FFFD, so it can be sent.
src/anthropic/lib/tools/_toolsets/_sanitize.py:41
↓ 6 callersMethodwith_middleware
A new client with the given middleware appended after this client's middleware. Convenience for applying extra middleware to a single request
src/anthropic/_client.py:554
↓ 5 callersMethod__get_proxied__
(self)
src/anthropic/_utils/_proxy.py:57
← previousnext →401–500 of 13,873, ranked by callers