cayu.tools.catalogue
Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.
build_tool_catalog_snapshot
Section titled “build_tool_catalog_snapshot”from cayu.tools import build_tool_catalog_snapshotCopy and canonicalize an admitted descriptor collection.
build_tool_catalog_snapshot(descriptors: Iterable[ToolDescriptor]) -> ToolCatalogSnapshotRelease source · Runtime guarantees · Capability guides
build_tool_descriptor
Section titled “build_tool_descriptor”from cayu.tools import build_tool_descriptorBuild one descriptor from copied runtime-admitted registration state.
build_tool_descriptor(*, name: str, description: str, input_schema: Mapping[str, Any], parallel_safe: bool, effect: ToolEffect, publishes_arguments: bool, workspace_mutation: bool, execution_contract: ToolExecutionContract | None=None, execution_requirements: tuple[ToolExecutionRequirement, ...]=(), auxiliary_inference: AuxiliaryInferencePolicy | None=None, provenance: ToolDescriptorProvenance | None=None) -> ToolDescriptorRelease source · Runtime guarantees · Capability guides
CALL_TOOL_NAME
Section titled “CALL_TOOL_NAME”from cayu.tools import CALL_TOOL_NAMECALL_TOOL_NAME = 'call_tool'Release source · Runtime guarantees · Capability guides
canonical_tool_id
Section titled “canonical_tool_id”from cayu.tools import canonical_tool_idReturn one stable collision-free ID from admitted tool provenance.
canonical_tool_id(*, name: str, provenance: ToolDescriptorProvenance) -> strRelease source · Runtime guarantees · Capability guides
copy_tool_catalog_snapshot
Section titled “copy_tool_catalog_snapshot”from cayu.tools import copy_tool_catalog_snapshotReturn a detached, fully revalidated catalogue snapshot.
copy_tool_catalog_snapshot(snapshot: ToolCatalogSnapshot) -> ToolCatalogSnapshotRelease source · Runtime guarantees · Capability guides
copy_tool_descriptor
Section titled “copy_tool_descriptor”from cayu.tools import copy_tool_descriptorReturn a detached, fully revalidated descriptor.
copy_tool_descriptor(descriptor: ToolDescriptor) -> ToolDescriptorRelease source · Runtime guarantees · Capability guides
copy_tool_descriptor_provenance
Section titled “copy_tool_descriptor_provenance”from cayu.tools import copy_tool_descriptor_provenanceReturn a detached, fully revalidated provenance record.
copy_tool_descriptor_provenance(provenance: ToolDescriptorProvenance) -> ToolDescriptorProvenanceRelease source · Runtime guarantees · Capability guides
FRAMEWORK_TOOL_NAMES
Section titled “FRAMEWORK_TOOL_NAMES”from cayu.tools import FRAMEWORK_TOOL_NAMESFRAMEWORK_TOOL_NAMES = frozenset({CALL_TOOL_NAME, SEARCH_TOOLS_NAME, STRUCTURED_OUTPUT_TOOL_NAME})Release source · Runtime guarantees · Capability guides
SEARCH_TOOLS_NAME
Section titled “SEARCH_TOOLS_NAME”from cayu.tools import SEARCH_TOOLS_NAMESEARCH_TOOLS_NAME = 'search_tools'Release source · Runtime guarantees · Capability guides
STRUCTURED_OUTPUT_TOOL_NAME
Section titled “STRUCTURED_OUTPUT_TOOL_NAME”from cayu.tools import STRUCTURED_OUTPUT_TOOL_NAMESTRUCTURED_OUTPUT_TOOL_NAME = '__cayu_submit_structured_output'Release source · Runtime guarantees · Capability guides
tool_catalogue_descriptors_within_ceiling
Section titled “tool_catalogue_descriptors_within_ceiling”from cayu.tools import tool_catalogue_descriptors_within_ceilingReturn the canonical catalogue view admitted by a durable name ceiling.
tool_catalogue_descriptors_within_ceiling(snapshot: ToolCatalogSnapshot, tool_names: Iterable[str]) -> tuple[ToolDescriptor, ...]Release source · Runtime guarantees · Capability guides
TOOL_CATALOGUE_MAX_BYTES
Section titled “TOOL_CATALOGUE_MAX_BYTES”from cayu.tools import TOOL_CATALOGUE_MAX_BYTESTOOL_CATALOGUE_MAX_BYTES = 32 * 1024 * 1024Release source · Runtime guarantees · Capability guides
TOOL_CATALOGUE_MAX_TOOLS
Section titled “TOOL_CATALOGUE_MAX_TOOLS”from cayu.tools import TOOL_CATALOGUE_MAX_TOOLSTOOL_CATALOGUE_MAX_TOOLS = 10000Release source · Runtime guarantees · Capability guides
TOOL_CATALOGUE_SCHEMA_VERSION
Section titled “TOOL_CATALOGUE_SCHEMA_VERSION”from cayu.tools import TOOL_CATALOGUE_SCHEMA_VERSIONTOOL_CATALOGUE_SCHEMA_VERSION = 1Release source · Runtime guarantees · Capability guides
TOOL_DESCRIPTOR_SCHEMA_VERSION
Section titled “TOOL_DESCRIPTOR_SCHEMA_VERSION”from cayu.tools import TOOL_DESCRIPTOR_SCHEMA_VERSIONTOOL_DESCRIPTOR_SCHEMA_VERSION = 4Release source · Runtime guarantees · Capability guides
TOOL_ID_MAX_CHARS
Section titled “TOOL_ID_MAX_CHARS”from cayu.tools import TOOL_ID_MAX_CHARSTOOL_ID_MAX_CHARS = 512Release source · Runtime guarantees · Capability guides
ToolCatalogSnapshot
Section titled “ToolCatalogSnapshot”from cayu.tools import ToolCatalogSnapshotImmutable, deterministically ordered canonical tool catalogue.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
schema_version |
Literal[1] |
TOOL_CATALOGUE_SCHEMA_VERSION |
descriptors |
tuple[ToolDescriptor, ...] |
() |
descriptor_count |
StrictInt |
Field(ge=0, le=TOOL_CATALOGUE_MAX_TOOLS) |
revision |
str |
Field(default='', pattern='^(?:|sha256:[0-9a-f]{64})$') |
validate_schema_version (method)
Section titled “validate_schema_version (method)”ToolCatalogSnapshot.validate_schema_version(value: object) -> objectcopy_descriptors (method)
Section titled “copy_descriptors (method)”ToolCatalogSnapshot.copy_descriptors(value: object) -> tuple[ToolDescriptor, ...]validate_and_bind_revision (method)
Section titled “validate_and_bind_revision (method)”ToolCatalogSnapshot.validate_and_bind_revision() -> ToolCatalogSnapshotdescriptor_for_name (method)
Section titled “descriptor_for_name (method)”ToolCatalogSnapshot.descriptor_for_name(name: str) -> ToolDescriptorReturn one copied descriptor by its model-visible registered name.
descriptor_for_id (method)
Section titled “descriptor_for_id (method)”ToolCatalogSnapshot.descriptor_for_id(tool_id: str) -> ToolDescriptorReturn one copied descriptor by its canonical tool identity.
Release source · Runtime guarantees · Capability guides
ToolDescriptor
Section titled “ToolDescriptor”from cayu.tools import ToolDescriptorImmutable canonical contract for one runtime-admitted tool.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
schema_version |
Literal[4] |
TOOL_DESCRIPTOR_SCHEMA_VERSION |
tool_id |
str |
'' |
name |
str |
required |
description |
str |
'' |
input_schema |
Mapping[str, Any] |
Field(default_factory=dict) |
parallel_safe |
StrictBool |
True |
effect |
ToolEffect |
ToolEffect.EXTERNAL |
publishes_arguments |
StrictBool |
True |
workspace_mutation |
StrictBool |
False |
execution_contract |
ToolExecutionContract |
Field(default_factory=ToolExecutionContract) |
execution_requirements |
tuple[ToolExecutionRequirement, ...] |
() |
auxiliary_inference |
AuxiliaryInferencePolicy | None |
None |
provenance |
ToolDescriptorProvenance |
Field(default_factory=ToolDescriptorProvenance) |
schema_fingerprint |
str |
Field(default='', pattern='^(?:|sha256:[0-9a-f]{64})$') |
version |
str |
Field(default='', pattern='^(?:|sha256:[0-9a-f]{64})$') |
copy_execution_requirements (method)
Section titled “copy_execution_requirements (method)”ToolDescriptor.copy_execution_requirements(value: object) -> tuple[ToolExecutionRequirement, ...]copy_auxiliary_inference (method)
Section titled “copy_auxiliary_inference (method)”ToolDescriptor.copy_auxiliary_inference(value: object) -> AuxiliaryInferencePolicy | Nonevalidate_schema_version (method)
Section titled “validate_schema_version (method)”ToolDescriptor.validate_schema_version(value: object) -> objectvalidate_name (method)
Section titled “validate_name (method)”ToolDescriptor.validate_name(value: str) -> strvalidate_description (method)
Section titled “validate_description (method)”ToolDescriptor.validate_description(value: str) -> strcopy_input_schema (method)
Section titled “copy_input_schema (method)”ToolDescriptor.copy_input_schema(value: object) -> dict[str, Any]freeze_input_schema (method)
Section titled “freeze_input_schema (method)”ToolDescriptor.freeze_input_schema(value: Mapping[str, Any]) -> Mapping[str, Any]serialize_input_schema (method)
Section titled “serialize_input_schema (method)”ToolDescriptor.serialize_input_schema(value: Mapping[str, Any]) -> dict[str, Any]copy_provenance (method)
Section titled “copy_provenance (method)”ToolDescriptor.copy_provenance(value: object) -> objectvalidate_and_bind_identity (method)
Section titled “validate_and_bind_identity (method)”ToolDescriptor.validate_and_bind_identity() -> ToolDescriptorinput_schema_copy (method)
Section titled “input_schema_copy (method)”ToolDescriptor.input_schema_copy() -> dict[str, Any]Return an owned ordinary-JSON schema copy.
exposure_capability_material (method)
Section titled “exposure_capability_material (method)”ToolDescriptor.exposure_capability_material() -> dict[str, Any]Return the existing callable-free exposure-policy projection.
execution_profile_material (method)
Section titled “execution_profile_material (method)”ToolDescriptor.execution_profile_material() -> dict[str, Any]Return compact material for the durable ordered direct-tools component.
Release source · Runtime guarantees · Capability guides
ToolDescriptorProvenance
Section titled “ToolDescriptorProvenance”from cayu.tools import ToolDescriptorProvenanceCallable-free origin evidence for one canonical descriptor.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
kind |
Literal['cayu', 'mcp'] |
'cayu' |
source_id |
str | None |
None |
source_tool_fingerprint |
str | None |
Field(default=None, pattern=_SHA256_IDENTIFIER_PATTERN) |
source_contract_fingerprint |
str | None |
Field(default=None, pattern=_SHA256_IDENTIFIER_PATTERN) |
validate_optional_text (method)
Section titled “validate_optional_text (method)”ToolDescriptorProvenance.validate_optional_text(value: str | None, info) -> str | Nonevalidate_shape (method)
Section titled “validate_shape (method)”ToolDescriptorProvenance.validate_shape() -> ToolDescriptorProvenanceRelease source · Runtime guarantees · Capability guides
ToolExecutionContract
Section titled “ToolExecutionContract”from cayu.tools import ToolExecutionContractCallable-free evidence for the boundary that executes one tool.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
boundary |
Literal['in_process', 'posix_process'] |
'in_process' |
timeout_strength |
Literal['none', 'cooperative_in_process', 'hard_process_deadline'] |
'none' |
sandboxed |
StrictBool |
False |
adapter_identity |
ExecutionProfileBehaviorIdentity | None |
None |
adapter_configuration_sha256 |
str | None |
Field(default=None, pattern=_SHA256_IDENTIFIER_PATTERN) |
hard_deadline_seconds |
float | None |
None |
protocol |
str | None |
None |
protocol_version |
StrictInt | None |
None |
max_terminal_payload_bytes |
StrictInt | None |
Field(default=None, ge=64 * 1024, le=MAX_DURABLE_JSON_INTEGER) |
copy_adapter_identity (method)
Section titled “copy_adapter_identity (method)”ToolExecutionContract.copy_adapter_identity(value: object) -> objectvalidate_optional_protocol (method)
Section titled “validate_optional_protocol (method)”ToolExecutionContract.validate_optional_protocol(value: str | None) -> str | Nonevalidate_optional_deadline (method)
Section titled “validate_optional_deadline (method)”ToolExecutionContract.validate_optional_deadline(value: object) -> objectvalidate_shape (method)
Section titled “validate_shape (method)”ToolExecutionContract.validate_shape() -> ToolExecutionContractRelease source · Runtime guarantees · Capability guides
validate_application_tool_name
Section titled “validate_application_tool_name”from cayu.tools import validate_application_tool_nameValidate one registered application name against Cayu’s framework namespace.
validate_application_tool_name(value: str) -> str