Tool
junjo.agent.tool.Tool
Kind: Class
SDK version: 0.67.0
Documentation channel: Stable release
Signature
Section titled “Signature”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)Immutable typed capability declaration available to an Agent.
Constructor
Section titled “Constructor”Declare one typed Tool and exactly one service ownership mode.
Parameters
Section titled “Parameters”| 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 |
Raises
Section titled “Raises”| Exception | Description |
|---|---|
ToolConfigurationError |
If schemas, identity, or service ownership are invalid. |
Members
Section titled “Members”name: strPublic attribute.
description
Section titled “description”description: strPublic attribute.
input_schema
Section titled “input_schema”input_schema: Mapping[str, FrozenJsonValue]Public attribute.
output_schema
Section titled “output_schema”output_schema: Mapping[str, FrozenJsonValue]Public attribute.
structural_id
Section titled “structural_id”structural_id: strPublic attribute.
input_adapter
Section titled “input_adapter”input_adapter: TypeAdapter[ToolInputT]Public attribute.
output_adapter
Section titled “output_adapter”output_adapter: TypeAdapter[ToolOutputT]Public attribute.
shared_service
Section titled “shared_service”shared_service: ToolService[ToolInputT, ToolOutputT, DependenciesT] | NonePublic attribute.
factory
Section titled “factory”factory: ToolServiceFactory[ToolInputT, ToolOutputT, DependenciesT] | NonePublic attribute.
structural_material
Section titled “structural_material”structural_material() -> dict[str, object]Public member documented by its signature.
definition_snapshot
Section titled “definition_snapshot”definition_snapshot() -> dict[str, object]Public member documented by its signature.