Skip to content

Tool

junjo.agent.tool.Tool

Kind: Class

SDK version: 0.67.0

Documentation channel: Stable release

Tool(*, name: str, description: str, input_type: TypeForm[ToolInputT], output_type: TypeForm[ToolOutputT], shared_service: ToolService[ToolInputT, ToolOutputT, DependenciesT] | None = None, factory: ToolServiceFactory[ToolInputT, ToolOutputT, DependenciesT] | None = None)

View source

Immutable typed capability declaration available to an Agent.

Declare one typed Tool and exactly one service ownership mode.

Name Type Description Default
name str Unique model-facing Tool name.
description str Model-facing description included in requests.
input_type TypeForm[ToolInputT] Object-root Pydantic-compatible argument type.
output_type TypeForm[ToolOutputT] Pydantic-compatible result type.
shared_service ToolService[ToolInputT, ToolOutputT, DependenciesT] | None Caller-guaranteed concurrency-safe service. None
factory ToolServiceFactory[ToolInputT, ToolOutputT, DependenciesT] | None Synchronous factory invoked once per admitted Agent
run, lazily before the Tool’s first service call.
None
Exception Description
ToolConfigurationError If schemas, identity, or service
ownership are invalid.

name: str

View source

Public attribute.

description: str

View source

Public attribute.

input_schema: Mapping[str, FrozenJsonValue]

View source

Public attribute.

output_schema: Mapping[str, FrozenJsonValue]

View source

Public attribute.

structural_id: str

View source

Public attribute.

input_adapter: TypeAdapter[ToolInputT]

View source

Public attribute.

output_adapter: TypeAdapter[ToolOutputT]

View source

Public attribute.

shared_service: ToolService[ToolInputT, ToolOutputT, DependenciesT] | None

View source

Public attribute.

factory: ToolServiceFactory[ToolInputT, ToolOutputT, DependenciesT] | None

View source

Public attribute.

structural_material() -> dict[str, object]

View source

Public member documented by its signature.

definition_snapshot() -> dict[str, object]

View source

Public member documented by its signature.