Codex.Tools (Codex SDK v0.3.0)
View SourcePublic API for registering and invoking Codex tools.
Summary
Functions
Deregisters a tool using the handle returned from register/2.
Invokes a registered tool, passing argument and contextual data.
Looks up a registered tool by name.
Returns a snapshot of accumulated tool invocation metrics keyed by tool name.
Registers a tool module with optional overrides.
Clears all recorded metrics. Primarily used in test setups.
Functions
@spec deregister(Codex.Tools.Handle.t()) :: :ok | {:error, term()}
Deregisters a tool using the handle returned from register/2.
Invokes a registered tool, passing argument and contextual data.
Looks up a registered tool by name.
Returns a snapshot of accumulated tool invocation metrics keyed by tool name.
@spec register( module(), keyword() ) :: {:ok, Codex.Tools.Handle.t()} | {:error, term()}
Registers a tool module with optional overrides.
Options:
:name– tool identifier (defaults to metadatanameor module name):description– human readable description:schema– optional structured output schema metadata
@spec reset_metrics() :: :ok
Clears all recorded metrics. Primarily used in test setups.