vendor_fabric.anthropic.tools

Provider capability functions for Anthropic Claude operations.

This module provides provider capability functions for Anthropic operations.

Module Contents

Classes

CreateMessageSchema

Pydantic schema for the anthropic_create_message tool.

ListModelsSchema

Pydantic schema for the anthropic_list_models tool.

Functions

anthropic_create_message

Create a message using Anthropic Claude.

anthropic_list_models

List available Anthropic Claude models.

Data

API

class vendor_fabric.anthropic.tools.CreateMessageSchema(/, **data: Any)

Bases: pydantic.BaseModel

Pydantic schema for the anthropic_create_message tool.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model: str = 'Field(...)'
max_tokens: int = 'Field(...)'
prompt: str = 'Field(...)'
system: str | None = 'Field(...)'
model_config: ClassVar[pydantic.config.ConfigDict] = 'ConfigDict(...)'
classmethod model_fields() dict[str, pydantic.fields.FieldInfo]
classmethod model_computed_fields() dict[str, pydantic.fields.ComputedFieldInfo]
property model_extra: dict[str, Any] | None
property model_fields_set: set[str]
classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) typing_extensions.Self
model_copy(*, update: collections.abc.Mapping[str, Any] | None = None, deep: bool = False) typing_extensions.Self
model_dump(*, mode: Literal[json, python] | str = 'python', include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal[none, warn, error] = True, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, polymorphic_serialization: bool | None = None) dict[str, Any]
model_dump_json(*, indent: int | None = None, ensure_ascii: bool = False, include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal[none, warn, error] = True, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, polymorphic_serialization: bool | None = None) str
classmethod model_json_schema(by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE, schema_generator: type[pydantic.json_schema.GenerateJsonSchema] = GenerateJsonSchema, mode: pydantic.json_schema.JsonSchemaMode = 'validation', *, union_format: Literal[any_of, primitive_type_array] = 'any_of') dict[str, Any]
classmethod model_parametrized_name(params: tuple[type[Any], ...]) str
model_post_init(context: Any, /) None
classmethod model_rebuild(*, force: bool = False, raise_errors: bool = True, _parent_namespace_depth: int = 2, _types_namespace: pydantic._internal._namespace_utils.MappingNamespace | None = None) bool | None
classmethod model_validate(obj: Any, *, strict: bool | None = None, extra: pydantic.config.ExtraValues | None = None, from_attributes: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) typing_extensions.Self
classmethod model_validate_json(json_data: str | bytes | bytearray, *, strict: bool | None = None, extra: pydantic.config.ExtraValues | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) typing_extensions.Self
classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, extra: pydantic.config.ExtraValues | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) typing_extensions.Self
dict(*, include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) Dict[str, Any]
json(*, include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Callable[[Any], Any] | None = PydanticUndefined, models_as_dict: bool = PydanticUndefined, **dumps_kwargs: Any) str
classmethod parse_obj(obj: Any) typing_extensions.Self
classmethod parse_raw(b: str | bytes, *, content_type: str | None = None, encoding: str = 'utf8', proto: pydantic.deprecated.parse.Protocol | None = None, allow_pickle: bool = False) typing_extensions.Self
classmethod parse_file(path: str | pathlib.Path, *, content_type: str | None = None, encoding: str = 'utf8', proto: pydantic.deprecated.parse.Protocol | None = None, allow_pickle: bool = False) typing_extensions.Self
classmethod from_orm(obj: Any) typing_extensions.Self
classmethod construct(_fields_set: set[str] | None = None, **values: Any) typing_extensions.Self
copy(*, include: pydantic._internal._utils.AbstractSetIntStr | pydantic._internal._utils.MappingIntStrAny | None = None, exclude: pydantic._internal._utils.AbstractSetIntStr | pydantic._internal._utils.MappingIntStrAny | None = None, update: Dict[str, Any] | None = None, deep: bool = False) typing_extensions.Self
classmethod schema(by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE) Dict[str, Any]
classmethod schema_json(*, by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE, **dumps_kwargs: Any) str
classmethod validate(value: Any) typing_extensions.Self
classmethod update_forward_refs(**localns: Any) None
class vendor_fabric.anthropic.tools.ListModelsSchema(/, **data: Any)

Bases: pydantic.BaseModel

Pydantic schema for the anthropic_list_models tool.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config: ClassVar[pydantic.config.ConfigDict] = 'ConfigDict(...)'
classmethod model_fields() dict[str, pydantic.fields.FieldInfo]
classmethod model_computed_fields() dict[str, pydantic.fields.ComputedFieldInfo]
property model_extra: dict[str, Any] | None
property model_fields_set: set[str]
classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) typing_extensions.Self
model_copy(*, update: collections.abc.Mapping[str, Any] | None = None, deep: bool = False) typing_extensions.Self
model_dump(*, mode: Literal[json, python] | str = 'python', include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal[none, warn, error] = True, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, polymorphic_serialization: bool | None = None) dict[str, Any]
model_dump_json(*, indent: int | None = None, ensure_ascii: bool = False, include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal[none, warn, error] = True, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, polymorphic_serialization: bool | None = None) str
classmethod model_json_schema(by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE, schema_generator: type[pydantic.json_schema.GenerateJsonSchema] = GenerateJsonSchema, mode: pydantic.json_schema.JsonSchemaMode = 'validation', *, union_format: Literal[any_of, primitive_type_array] = 'any_of') dict[str, Any]
classmethod model_parametrized_name(params: tuple[type[Any], ...]) str
model_post_init(context: Any, /) None
classmethod model_rebuild(*, force: bool = False, raise_errors: bool = True, _parent_namespace_depth: int = 2, _types_namespace: pydantic._internal._namespace_utils.MappingNamespace | None = None) bool | None
classmethod model_validate(obj: Any, *, strict: bool | None = None, extra: pydantic.config.ExtraValues | None = None, from_attributes: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) typing_extensions.Self
classmethod model_validate_json(json_data: str | bytes | bytearray, *, strict: bool | None = None, extra: pydantic.config.ExtraValues | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) typing_extensions.Self
classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, extra: pydantic.config.ExtraValues | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) typing_extensions.Self
dict(*, include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) Dict[str, Any]
json(*, include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Callable[[Any], Any] | None = PydanticUndefined, models_as_dict: bool = PydanticUndefined, **dumps_kwargs: Any) str
classmethod parse_obj(obj: Any) typing_extensions.Self
classmethod parse_raw(b: str | bytes, *, content_type: str | None = None, encoding: str = 'utf8', proto: pydantic.deprecated.parse.Protocol | None = None, allow_pickle: bool = False) typing_extensions.Self
classmethod parse_file(path: str | pathlib.Path, *, content_type: str | None = None, encoding: str = 'utf8', proto: pydantic.deprecated.parse.Protocol | None = None, allow_pickle: bool = False) typing_extensions.Self
classmethod from_orm(obj: Any) typing_extensions.Self
classmethod construct(_fields_set: set[str] | None = None, **values: Any) typing_extensions.Self
copy(*, include: pydantic._internal._utils.AbstractSetIntStr | pydantic._internal._utils.MappingIntStrAny | None = None, exclude: pydantic._internal._utils.AbstractSetIntStr | pydantic._internal._utils.MappingIntStrAny | None = None, update: Dict[str, Any] | None = None, deep: bool = False) typing_extensions.Self
classmethod schema(by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE) Dict[str, Any]
classmethod schema_json(*, by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE, **dumps_kwargs: Any) str
classmethod validate(value: Any) typing_extensions.Self
classmethod update_forward_refs(**localns: Any) None
vendor_fabric.anthropic.tools.anthropic_create_message(model: str, prompt: str, max_tokens: int = 1024, system: str | None = None) extended_data.containers.ExtendedDict

Create a message using Anthropic Claude.

Args: model: Model ID. prompt: User prompt text. max_tokens: Max tokens to generate. system: Optional system prompt.

Returns: Dict with message ID, text, and usage.

vendor_fabric.anthropic.tools.anthropic_list_models() extended_data.containers.ExtendedList[extended_data.containers.ExtendedDict]

List available Anthropic Claude models.

Returns: List of models with ID and display name.

vendor_fabric.anthropic.tools.TOOL_DEFINITIONS = None