MCPcopy Create free account

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

Functions12,274 in github.com/anthropics/anthropic-sdk-python

↓ 1 callersMethod_collect
(self, line_bytes: bytes, *, newline_terminated: bool)
src/anthropic/lib/tools/_files.py:67
↓ 1 callersFunction_collect_files
(directory: Path, relative_to: Path, files: list[FileTypes])
src/anthropic/lib/_files.py:19
↓ 1 callersMethod_compact_after_final_turn
(self, message: ParsedBetaMessage[ResponseFormatT])
src/anthropic/lib/tools/_beta_runner.py:680
↓ 1 callersMethod_compact_after_final_turn
( self, message: ParsedBetaMessage[ResponseFormatT] )
src/anthropic/lib/tools/_beta_runner.py:1212
↓ 1 callersFunction_compaction_tool_changes
The ``tool_changes`` of a ``compaction`` block, whichever shape it has in history. A caller-written block is a dict; one the runner echoed from a
src/anthropic/lib/tools/_tool_dispatch.py:187
↓ 1 callersFunction_confined
Yield the matches whose canonical path is inside `root`; a match that cannot be canonicalised (symlink loop, unreadable) is dropped, not raised.
src/anthropic/lib/tools/agent_toolset.py:814
↓ 1 callersFunction_construct_field
(value: object, field: FieldInfo, key: str)
src/anthropic/_models.py:570
↓ 1 callersFunction_convert_tool_result
Convert MCP `CallToolResult` to a value suitable for returning from `call()`.
src/anthropic/lib/tools/mcp.py:304
↓ 1 callersMethod_copy_and_prepare
A copy of `options` with `extra_body` merged into the body, and the body and query prepared. The data is walked once per request, before the
src/anthropic/_base_client.py:2262
↓ 1 callersMethod_corroborated_delete
Send the server delete only after the file's absence is confirmed. Records the miss on the first sync; deletes on a later one after t
src/anthropic/lib/tools/_memories.py:857
↓ 1 callersFunction_create_pydantic_model
(type_: _T)
src/anthropic/_models.py:1029
↓ 1 callersMethod_create_schema_from_function
Create JSON schema from function signature using pydantic.
src/anthropic/lib/tools/_beta_functions.py:224
↓ 1 callersFunction_credentials_file_path
Path to `<config_dir>/credentials/<profile>.json` (secret, 0600).
src/anthropic/lib/credentials/_constants.py:182
↓ 1 callersMethod_current_snapshot_or_none
(self)
src/anthropic/lib/streaming/_messages.py:134
↓ 1 callersFunction_custom_tool_result
(custom_tool_use_id: str)
tests/lib/tools/test_session_runner.py:111
↓ 1 callersFunction_dec
(*_: Any, **__: Any)
src/anthropic/_models.py:1044
↓ 1 callersMethod_declared_tools
The names of the tools in the `tools` param, and the families of its toolsets, which have no name.
src/anthropic/lib/tools/_beta_runner.py:541
↓ 1 callersFunction_deepcopy_with_paths
(item: _T, paths: Sequence[Sequence[str]], index: int)
src/anthropic/_files.py:164
↓ 1 callersMethod_delete_remote
( self, store: _AttachedStore, rel: str, remote: BetaManagedAgentsMemory, base_sha: str )
src/anthropic/lib/tools/_memories.py:903
↓ 1 callersFunction_discriminator_cache_key
(union: type)
src/anthropic/_models.py:818
↓ 1 callersFunction_download_and_extract
Download and extract the skill archive in an owner-only directory beside `dest`, then replace `dest`.
src/anthropic/lib/tools/_skills.py:264
↓ 1 callersFunction_drive_hop
Feed one hop's SSE events through `reader`, yielding the frames to forward.
src/anthropic/lib/middleware/_fallbacks.py:1035
↓ 1 callersFunction_drive_hop_async
Feed one hop's SSE events through `reader`, yielding the frames to forward. The outcome is read from `reader.finish()` afterwards — async generat
src/anthropic/lib/middleware/_fallbacks.py:1047
↓ 1 callersMethod_end_turn_after
( self, events: Iterator[ParsedBetaMessageStreamEvent[ResponseFormatT]] )
src/anthropic/lib/threads/_stream_managers.py:58
↓ 1 callersMethod_end_turn_after
( self, events: AsyncIterator[ParsedBetaMessageStreamEvent[ResponseFormatT]] )
src/anthropic/lib/threads/_stream_managers.py:103
↓ 1 callersMethod_ensure_access_token
(self)
src/anthropic/lib/vertex/_client.py:146
↓ 1 callersMethod_ensure_access_token
(self)
src/anthropic/lib/vertex/_client.py:312
↓ 1 callersFunction_entered
()
src/anthropic/lib/tools/_beta_functions.py:573
↓ 1 callersMethod_events_for
The events resource that sends the result of a tool call whose span has `conversation_id`. The spans of its requests have the conversation ID
src/anthropic/lib/tools/_beta_session_runner.py:1054
↓ 1 callersMethod_execute
Run `ev`'s tool, post its result, and surface the dispatched call. `confirmation` is the verdict that released the call onto the work
src/anthropic/lib/tools/_beta_session_runner.py:954
↓ 1 callersFunction_extract_field_schema_pv2
(model: type[BaseModel], field_name: str)
src/anthropic/_models.py:928
↓ 1 callersFunction_extract_items
( obj: object, path: Sequence[str], *, index: int, flattened_key: str | None, array_fo
src/anthropic/_utils/_utils.py:75
↓ 1 callersFunction_file_tools_may_reach
True when `path` resolves to somewhere inside `workdir` or `allowed_roots`, and when it or one of those directories cannot be resolved.
src/anthropic/lib/tools/agent_toolset.py:435
↓ 1 callersFunction_fill_missing_from_env
Fill empty profile fields from corresponding ANTHROPIC_* env vars. The profile file is authoritative — this only fills fields the file left u
src/anthropic/lib/credentials/_providers.py:87
↓ 1 callersMethod_finalize_middleware_result
Convert the `APIResponse` returned by the middleware chain into the value the original caller expects. The middleware chain operates on `APIR
src/anthropic/_base_client.py:1386
↓ 1 callersMethod_finalize_middleware_result
Convert the `AsyncAPIResponse` returned by the middleware chain into the value the original caller expects. The middleware chain operates on
src/anthropic/_base_client.py:2172
↓ 1 callersFunction_first_cause
The first cause under an exception group, which anyio wraps a failed request in.
src/anthropic/lib/environments/_worker.py:264
↓ 1 callersFunction_flattened_causes
The causes under an exception group — anyio's wrapper message says nothing.
src/anthropic/lib/environments/_worker.py:256
↓ 1 callersFunction_force_stop_quietly
Best-effort `work.stop(force=True)` for an item that can't be processed. A 409 just means the work already stopped; anything else is logged but n
src/anthropic/lib/environments/_poller.py:238
↓ 1 callersMethod_gen
(self)
tests/lib/tools/test_session_runner.py:177
↓ 1 callersMethod_generate_tool_call_response
(self)
src/anthropic/lib/tools/_beta_runner.py:786
↓ 1 callersMethod_generate_tool_call_response
(self)
src/anthropic/lib/tools/_beta_runner.py:1350
↓ 1 callersMethod_get_description_from_docstring
Extract description from parsed docstring.
src/anthropic/lib/tools/_beta_functions.py:215
↓ 1 callersFunction_get_extra_fields_type
(cls: type[pydantic.BaseModel])
src/anthropic/_models.py:585
↓ 1 callersMethod_get_last_assistant_message
(self)
src/anthropic/lib/tools/_beta_runner.py:889
↓ 1 callersMethod_get_last_assistant_message
(self)
src/anthropic/lib/tools/_beta_runner.py:1336
↓ 1 callersMethod_get_last_assistant_message_content
(self)
src/anthropic/lib/tools/_beta_runner.py:896
↓ 1 callersMethod_get_last_assistant_message_content
(self)
src/anthropic/lib/tools/_beta_runner.py:1343
↓ 1 callersMethod_get_page
(self)
src/anthropic/_base_client.py:348
↓ 1 callersFunction_get_parameters_info
(fn: BaseFunctionTool[Any])
tests/lib/tools/test_functions.py:441
↓ 1 callersFunction_get_session
( *, aws_access_key: str | None, aws_secret_key: str | None, aws_session_token: str | None,
src/anthropic/lib/aws/_auth.py:14
↓ 1 callersMethod_get_token
(self)
src/anthropic/lib/google_cloud/_client.py:586
↓ 1 callersFunction_has_active_profile_config
Tighter auto-discover check for the active-profile step of the credential chain. Returns `True` only if the *active* profile's config file exists
src/anthropic/lib/credentials/_constants.py:189
↓ 1 callersFunction_has_auto_discoverable_credentials
True if the environment / filesystem contains signals that would normally drive the profile or env federation paths of `default_credentials`.
src/anthropic/lib/credentials/_constants.py:224
↓ 1 callersFunction_has_memory_store
True when the session has at least one memory store attached.
src/anthropic/lib/environments/_worker.py:270
↓ 1 callersFunction_hash_file
(path: Path)
src/anthropic/lib/tools/_file_store.py:351
↓ 1 callersFunction_interpolate
Replace {name} placeholders in `template`, quoting each value with `quoter`. Placeholder names are looked up in `values`. Raises: Ke
src/anthropic/_utils/_path.py:47
↓ 1 callersMethod_invoke_provider
Invoke `provider`, leaving out `force_refresh` for a legacy provider that doesn't take it.
src/anthropic/lib/credentials/_cache.py:147
↓ 1 callersFunction_is_async_cm_factory
True when `fn` is a function produced by `contextlib.asynccontextmanager`.
src/anthropic/lib/tools/_beta_functions.py:312
↓ 1 callersFunction_is_supported_resource_mime_type
(mime_type: str | None)
src/anthropic/lib/tools/mcp.py:106
↓ 1 callersFunction_is_sync_cm_factory
True when `fn` is a function produced by `contextlib.contextmanager`. `contextmanager` wraps the generator function with `functools.wraps`, so
src/anthropic/lib/tools/_beta_functions.py:300
↓ 1 callersMethod_iter_chunks
Given an iterator that yields raw binary data, iterate over it and yield individual SSE chunks
src/anthropic/_streaming.py:359
↓ 1 callersMethod_iter_events
(self)
src/anthropic/_streaming.py:198
↓ 1 callersFunction_iteration
(type: str, model: str)
tests/lib/threads/helpers.py:331
↓ 1 callersFunction_make_async_iterator
(iterable: Iterable[T], counter: Optional[Counter] = None)
tests/test_client.py:102
↓ 1 callersFunction_make_sync_iterator
(iterable: Iterable[T], counter: Optional[Counter] = None)
tests/test_client.py:95
↓ 1 callersFunction_make_targz
(path: Path, entries: dict[str, bytes])
tests/lib/tools/test_skills.py:77
↓ 1 callersFunction_make_targz_modes
(path: Path, entries: dict[str, tuple[bytes, int]])
tests/lib/tools/test_skills.py:90
↓ 1 callersFunction_make_zip_modes
(path: Path, entries: dict[str, tuple[bytes, int]])
tests/lib/tools/test_skills.py:81
↓ 1 callersFunction_media_type_literal_values
Extract the values of a `Required[Literal[...]]` TypedDict field.
tests/lib/tools/test_agent_toolset.py:460
↓ 1 callersFunction_migrate_legacy_config
Adapter: convert a flat legacy config dict into the new nested shape. Many tests in this file predate the schema migration and pass legacy fl
tests/lib/test_credentials.py:109
↓ 1 callersFunction_never
()
tests/lib/environments/test_worker.py:1262
↓ 1 callersFunction_new_system
(params: dict[str, Any])
tests/lib/threads/helpers.py:867
↓ 1 callersMethod_note_confirmation
Record an allow/deny verdict and release the held call it gates, if any.
src/anthropic/lib/tools/_beta_session_runner.py:852
↓ 1 callersFunction_old_enough_to_cache
(st: os.stat_result, walk_start_ns: int)
src/anthropic/lib/tools/_file_store.py:423
↓ 1 callersMethod_over_limit_error
(self)
src/anthropic/lib/tools/_files.py:74
↓ 1 callersMethod_params_from_url
(self, url: URL)
src/anthropic/_base_client.py:248
↓ 1 callersMethod_parse_retry_after_header
Returns a float of the number of seconds (not milliseconds) to wait after retrying, or None if unspecified. About the Retry-After header: htt
src/anthropic/_base_client.py:874
↓ 1 callersFunction_parse_timezone
(value: Optional[str])
src/anthropic/_utils/_datetime_parse.py:56
↓ 1 callersFunction_partial_reply
The part of a streamed reply worth keeping when the stream ended early, or `None` if nothing is. An unfinished block stays only if it is `text`, b
src/anthropic/lib/threads/_thread_state.py:617
↓ 1 callersFunction_platform_supported
()
src/anthropic/lib/tools/_file_store.py:293
↓ 1 callersMethod_prepare_options
Hook for mutating the given options
src/anthropic/_base_client.py:1164
↓ 1 callersMethod_prepare_options
Hook for mutating the given options
src/anthropic/_base_client.py:1941
↓ 1 callersMethod_prepare_options
(self, options: FinalRequestOptions)
src/anthropic/_client.py:399
↓ 1 callersMethod_prepare_options
(self, options: FinalRequestOptions)
src/anthropic/lib/aws/_client.py:153
↓ 1 callersMethod_prepare_options
(self, options: FinalRequestOptions)
src/anthropic/lib/google_cloud/_client.py:386
↓ 1 callersMethod_prepare_options
(self, options: FinalRequestOptions)
tests/test_client.py:736
↓ 1 callersMethod_prepare_request
This method is used as a callback for mutating the `Request` object after it has been constructed. This is useful for cases where you
src/anthropic/_base_client.py:1948
↓ 1 callersMethod_prepare_request
(self, request: httpx2.Request)
src/anthropic/lib/bedrock/_mantle.py:443
↓ 1 callersMethod_prepare_request
(self, request: httpx2.Request)
src/anthropic/lib/aws/_client.py:383
↓ 1 callersMethod_prepare_url
Merge a URL argument together with any 'base_url' on the client, to create the URL used for the outgoing request.
src/anthropic/_base_client.py:579
↓ 1 callersFunction_prepend_seam_blocks
(response: APIResponse[Any], seams: list[dict[str, Any]])
src/anthropic/lib/middleware/_fallbacks.py:1470
↓ 1 callersFunction_prepend_seam_blocks_async
(response: AsyncAPIResponse[Any], seams: list[dict[str, Any]])
src/anthropic/lib/middleware/_fallbacks.py:1485
↓ 1 callersMethod_primitive_value_to_str
(self, value: PrimitiveData)
src/anthropic/_qs.py:120
↓ 1 callersMethod_process_response_data
( self, *, data: object, cast_to: type[ResponseT], response: httpx2.Re
src/anthropic/_base_client.py:757
↓ 1 callersMethod_pull_all
Fetch and write the given memories, `_FETCH_CONCURRENCY` at a time. The sync's content pass: the listing carried no content, so each
src/anthropic/lib/tools/_memories.py:744
↓ 1 callersFunction_pydantic_locks_model_rebuild
()
src/anthropic/_models.py:131
↓ 1 callersFunction_read_binary_block
Read an image/PDF as a base64 `image`/`document` content block. The text cap does not apply here — its 256 KiB default would reject most real
src/anthropic/lib/tools/agent_toolset.py:660
↓ 1 callersMethod_read_credentials_if_exists
`_read_credentials` variant that returns `None` on absence instead of raising — used by the federation disk-cache path where a missing
src/anthropic/lib/credentials/_providers.py:629
↓ 1 callersFunction_read_json
(response: httpx2.Response)
src/anthropic/lib/middleware/_fallbacks.py:1607
← previousnext →1,301–1,400 of 12,274, ranked by callers