kw_arguments_schema() — anthropic-sdk-python Function Reference
Architecture documentation for the kw_arguments_schema() function in _beta_functions.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD a4ecbe26_788b_b335_0183_047d4c54bf71["kw_arguments_schema()"] 22620cc2_c27b_9b73_6ad4_3b2887ce2a27["CustomGenerateJsonSchema"] a4ecbe26_788b_b335_0183_047d4c54bf71 -->|defined in| 22620cc2_c27b_9b73_6ad4_3b2887ce2a27 3bf0e655_8383_b5ca_7c90_6b1d977bf9c8["_create_schema_from_function()"] 3bf0e655_8383_b5ca_7c90_6b1d977bf9c8 -->|calls| a4ecbe26_788b_b335_0183_047d4c54bf71 style a4ecbe26_788b_b335_0183_047d4c54bf71 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/anthropic/lib/tools/_beta_functions.py lines 145–167
def kw_arguments_schema(
self,
arguments: "list[ArgumentsParameter]",
var_kwargs_schema: CoreSchema | None,
) -> JsonSchemaValue:
schema = super().kw_arguments_schema(arguments, var_kwargs_schema)
if schema.get("type") != "object":
return schema
properties = schema.get("properties")
if not properties or not is_dict(properties):
return schema
# Add parameter descriptions from docstring
for param in self._parsed_docstring.params:
prop_schema = properties.get(param.arg_name)
if not prop_schema or not is_dict(prop_schema):
continue
if param.description and "description" not in prop_schema:
prop_schema["description"] = param.description
return schema
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does kw_arguments_schema() do?
kw_arguments_schema() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/lib/tools/_beta_functions.py.
Where is kw_arguments_schema() defined?
kw_arguments_schema() is defined in src/anthropic/lib/tools/_beta_functions.py at line 145.
What calls kw_arguments_schema()?
kw_arguments_schema() is called by 1 function(s): _create_schema_from_function.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free