> For the complete documentation index, see [llms.txt](https://docs.talus.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.talus.network/talus-docs-v2.1.0/reference/move/nexus_tool/tool_registry.md).

# nexus\_tool::tool\_registry

* [Struct `ToolRegistry`](#struct-toolregistry)
* [Struct `ToolRegistryInnerV1`](#struct-toolregistryinnerv1)
* [Struct `Tool`](#struct-tool)
* [Struct `ToolInnerV1`](#struct-toolinnerv1)
* [Struct `ToolRegistryAdminCap`](#struct-toolregistryadmincap)
* [Struct `ToolRegistryCreatedEvent`](#struct-toolregistrycreatedevent)
* [Struct `ToolRegisteredEvent`](#struct-toolregisteredevent)
* [Struct `ToolUnregisteredEvent`](#struct-toolunregisteredevent)
* [Struct `ToolSlashedEvent`](#struct-toolslashedevent)
* [Struct `ToolVerificationStatusChangedEvent`](#struct-toolverificationstatuschangedevent)
* [Struct `ToolUpdatedEvent`](#struct-toolupdatedevent)
* [Struct `ExternalVerifierRegisteredEvent`](#struct-externalverifierregisteredevent)
* [Enum `ToolRef`](#enum-toolref)
* [Constants](#constants)
* [Function `register_off_chain_tool`](#function-register_off_chain_tool)
  * [Collateral](#collateral)
  * [Slashing](#slashing)
  * [Owner Cap](#owner-cap)
  * [Payment Tickets](#payment-tickets)
* [Function `register_on_chain_tool`](#function-register_on_chain_tool)
  * [Owner Cap](#owner-cap-1)
* [Function `register_on_chain_tool_with_workflow_authorization_cap`](#function-register_on_chain_tool_with_workflow_authorization_cap)
* [Function `unregister`](#function-unregister)
* [Function `reregister_tool`](#function-reregister_tool)
* [Function `claim_collateral`](#function-claim_collateral)
* [Function `deescalate`](#function-deescalate)
* [Function `delegate_cashier_admin`](#function-delegate_cashier_admin)
* [Function `assert_tool_owner_generic`](#function-assert_tool_owner_generic)
* [Function `did_unregister_period_pass`](#function-did_unregister_period_pass)
* [Function `is_registered`](#function-is_registered)
* [Function `is_verified`](#function-is_verified)
* [Function `assert_tool_registered`](#function-assert_tool_registered)
* [Function `fqn`](#function-fqn)
* [Function `assert_registered_vertex`](#function-assert_registered_vertex)
* [Function `assert_registered_dag`](#function-assert_registered_dag)
* [Function `tool_timeout_ms`](#function-tool_timeout_ms)
* [Function `walk_timeout_ms_for_runtime_vertex`](#function-walk_timeout_ms_for_runtime_vertex)
* [Function `contains_tool`](#function-contains_tool)
* [Function `contains_tool_id`](#function-contains_tool_id)
* [Function `tool_id`](#function-tool_id)
* [Function `invocation_cost_mist`](#function-invocation_cost_mist)
* [Function `snapshot_invocation_cost`](#function-snapshot_invocation_cost)
* [Function `set_invocation_cost_mist`](#function-set_invocation_cost_mist)
* [Function `verifier_support`](#function-verifier_support)
* [Function `supports_verifier_mode`](#function-supports_verifier_mode)
* [Function `add_vertex_to_dag`](#function-add_vertex_to_dag)
* [Function `set_registered_vertex_verifier_mode`](#function-set_registered_vertex_verifier_mode)
* [Function `register_external_verifier`](#function-register_external_verifier)
* [Function `has_external_verifier`](#function-has_external_verifier)
* [Function `external_verifier_method`](#function-external_verifier_method)
* [Function `external_verifier_witness`](#function-external_verifier_witness)
* [Function `external_verifier_objects`](#function-external_verifier_objects)
* [Function `on_chain_tool_takes_workflow_authorization_cap_first`](#function-on_chain_tool_takes_workflow_authorization_cap_first)
* [Function `vertex_requires_authorization_grant`](#function-vertex_requires_authorization_grant)
* [Function `assert_on_chain_tool_witness`](#function-assert_on_chain_tool_witness)
* [Function `on_chain_tool_witness_id`](#function-on_chain_tool_witness_id)
* [Function `set_us_collateral_to_lock`](#function-set_us_collateral_to_lock)
* [Function `set_lock_duration_ms`](#function-set_lock_duration_ms)
* [Function `slash`](#function-slash)
* [Function `set_verified`](#function-set_verified)
* [Function `update_off_chain_tool_url`](#function-update_off_chain_tool_url)
* [Function `migrate_on_chain_tool_package`](#function-migrate_on_chain_tool_package)
* [Function `update_tool_metadata`](#function-update_tool_metadata)
* [Function `update_tool_timeout`](#function-update_tool_timeout)
* [Function `configure_registered_key_support`](#function-configure_registered_key_support)

### Struct `ToolRegistry`

Shared registry of tools, tracking timeouts, verifier methods, and collateral policy.

```move
public struct ToolRegistry has key
```

<details>

<summary>Fields</summary>

`id: sui::object::UID`

</details>

#### Struct `ToolRegistryInnerV1`

Version one stored layout for \[[`ToolRegistry`](#nexus_tool_tool_registry_ToolRegistry)].

```move
public struct ToolRegistryInnerV1 has store
```

<details>

<summary>Fields</summary>

`tool_ids: sui::linked_table::LinkedTable<std::ascii::String, sui::object::ID>`Current FQN-to-stable-Tool-ID membership.`registered_tools: sui::table::Table<sui::object::ID, bool>`Current stable Tool-ID membership for submission-time liveness checks.`meta_schemas: sui::table::Table<sui::object::ID,` [`nexus_interface::meta_schema::MetaSchema`](/talus-docs-v2.1.0/reference/move/nexus_interface/meta_schema.md#nexus_interface_meta_schema_MetaSchema)`>`Immutable protocol schema for each currently registered Tool ID.`timeouts: sui::linked_table::LinkedTable<std::ascii::String, u64>`Timeout by Tool FQN for execution-time lookup without loading each derived Tool object.[`verifier_support`](#nexus_tool_tool_registry_verifier_support)`: sui::table::Table<sui::object::ID,` [`nexus_interface::verifier::ToolVerifierSupport`](/talus-docs-v2.1.0/reference/move/nexus_interface/verifier.md#nexus_interface_verifier_ToolVerifierSupport)`>`The one verified mode supported by each configured off-chain Tool.`external_verifiers: sui::table::Table<sui::object::ID,` [`nexus_tool::external_verifier::ExternalVerifier`](/talus-docs-v2.1.0/reference/move/nexus_tool/external_verifier.md#nexus_tool_external_verifier_ExternalVerifier)`>`External verifier configuration by stable Tool ID.`invocation_costs_mist: sui::table::Table<std::ascii::String, u64>`Invocation price in MIST by Tool FQN.`on_chain_tool_witnesses: sui::linked_table::LinkedTable<std::ascii::String, sui::object::ID>`Registered on-chain tool witness IDs by FQN.`workflow_authorization_cap_first: sui::linked_table::LinkedTable<std::ascii::String, bool>`On-chain tools whose execute function requires workflow vertex authorization cap as the first argument.`us_collateral_to_lock: u64`How much \[US] (in base units) to lock to register a tool.`lock_duration_ms: u64`How long is the collateral locked for in milliseconds after unregistering. Copied to tool upon registration.

</details>

#### Struct `Tool`

Generic derived object that holds information about a tool. On-chain and off-chain tools are differentiated based on \[[`ToolRef`](#nexus_tool_tool_registry_ToolRef)]

```move
public struct Tool has key, store
```

<details>

<summary>Fields</summary>

`id: sui::object::UID`

</details>

#### Struct `ToolInnerV1`

Version one stored layout for \[[`Tool`](#nexus_tool_tool_registry_Tool)].

```move
public struct ToolInnerV1 has store
```

<details>

<summary>Fields</summary>

`registry: sui::object::ID`[`fqn`](#nexus_tool_tool_registry_fqn)`: std::ascii::String`Fully qualified name of the tool.`ref:` [`nexus_tool::tool_registry::ToolRef`](#nexus_tool_tool_registry_ToolRef)On-chain package reference or off-chain HTTP endpoint.`description: vector<u8>`Description of the tool.[`meta_schema`](#nexus_tool_tool_registry_meta_schema)`:` [`nexus_interface::meta_schema::MetaSchema`](/talus-docs-v2.1.0/reference/move/nexus_interface/meta_schema.md#nexus_interface_meta_schema_MetaSchema)Immutable protocol schema used for registration, DAG construction, and execution.`verified: bool`Verification status set by the slashing authority. Tools are registered as unverified by default.`vault: sui::balance::Balance<talus::us::US>`To register a tool one must lock \[ToolRegistry::us\_collateral\_to\_lock] \[US].`workflow_authorization_cap_first: bool`True when an on-chain tool's execute function expects nexus\_primitives::authorization::ProvenValue as its first argument.`lock_duration_ms: u64`Collateral lock duration in milliseconds after unregistration.`registered_at_ms: u64`Timestamp when the Tool was registered.`unregistered_at_ms: std::option::Option<u64>`Unregistration timestamp, used to enforce the lock before the creator can reclaim collateral.

</details>

#### Struct `ToolRegistryAdminCap`

Authority over policy, verification, and collateral in one \[[`ToolRegistry`](#nexus_tool_tool_registry_ToolRegistry)].

```move
public struct ToolRegistryAdminCap has key, store
```

<details>

<summary>Fields</summary>

`id: sui::object::UIDregistry: sui::object::ID`

</details>

#### Struct `ToolRegistryCreatedEvent`

Emitted when a new \[ToolRegistry] is created.

```move
public struct ToolRegistryCreatedEvent has copy, drop
```

<details>

<summary>Fields</summary>

`registry: sui::object::ID`

</details>

#### Struct `ToolRegisteredEvent`

Emitted when a Tool is registered or re-registered. Re-registration starts a new trust epoch: it retains the stable Tool identity and immutable schema, restores collateral to the current lock policy when needed, applies a fresh timeout, clears verifier support, and sets `verified` to false. Metadata updates require a non-empty description and likewise clear `verified`; they do not alter the registration-time schema.

```move
public struct ToolRegisteredEvent has copy, drop
```

<details>

<summary>Fields</summary>

`tool: sui::object::ID`[`fqn`](#nexus_tool_tool_registry_fqn)`: std::ascii::String`

</details>

#### Struct `ToolUnregisteredEvent`

Emitted when a tool is unregistered.

```move
public struct ToolUnregisteredEvent has copy, drop
```

<details>

<summary>Fields</summary>

`tool: sui::object::ID`[`fqn`](#nexus_tool_tool_registry_fqn)`: std::ascii::String`

</details>

#### Struct `ToolSlashedEvent`

Emitted when a tool's collateral is slashed.

```move
public struct ToolSlashedEvent has copy, drop
```

<details>

<summary>Fields</summary>

`tool: sui::object::ID`[`fqn`](#nexus_tool_tool_registry_fqn)`: std::ascii::Stringamount: u64`Amount of US collateral in base units slashed.

</details>

#### Struct `ToolVerificationStatusChangedEvent`

Emitted when a tool's verification status changes.

```move
public struct ToolVerificationStatusChangedEvent has copy, drop
```

<details>

<summary>Fields</summary>

`tool: sui::object::ID`[`fqn`](#nexus_tool_tool_registry_fqn)`: std::ascii::Stringverified: bool`

</details>

#### Struct `ToolUpdatedEvent`

Emitted when a tool's metadata, URL, timeout, or verifier methods are updated.

```move
public struct ToolUpdatedEvent has copy, drop
```

<details>

<summary>Fields</summary>

`tool: sui::object::ID`[`fqn`](#nexus_tool_tool_registry_fqn)`: std::ascii::String`

</details>

#### Struct `ExternalVerifierRegisteredEvent`

Emitted when a Tool external verifier is registered.

```move
public struct ExternalVerifierRegisteredEvent has copy, drop
```

<details>

<summary>Fields</summary>

`registry: sui::object::IDtool: sui::object::IDmethod:` [`nexus_interface::verifier::VerifierMethodId`](/talus-docs-v2.1.0/reference/move/nexus_interface/verifier.md#nexus_interface_verifier_VerifierMethodId)`witness: sui::object::ID`

</details>

#### Enum `ToolRef`

Location and invocation identity of an off-chain or on-chain Tool.

```move
public enum ToolRef has copy, drop, store
```

<details>

<summary>Variants</summary>

Variant `Httpurl: vector<u8>`Variant `Suipackage_address: addressmodule_name: std::ascii::Stringtool_witness_id: sui::object::ID`

</details>

#### Constants

```move
#[error]
const EToolKindMismatch: vector<u8> = b"DAG Tool kind does not match registered Tool kind";
```

```move
#[error]
const EToolDescriptionEmpty: vector<u8> = b"Tool description must not be empty";
```

```move
#[error]
const ENotEnoughUsToLock: vector<u8> = b"Not enough US to lock collateral";
```

```move
#[error]
const ECollateralNotReadyToClaim: vector<u8> = b"Collateral not ready to reclaim";
```

```move
#[error]
const EUnauthorized: vector<u8> = b"Tool owner capability does not match this Tool";
```

```move
#[error]
const EToolUnregistered: vector<u8> = b"Tool has been unregistered";
```

```move
#[error]
const EFqnAlreadyExists: vector<u8> = b"FQN already exists";
```

```move
#[error]
const EToolNotHttpRef: vector<u8> = b"Tool is not an off-chain (HTTP) tool";
```

```move
#[error]
const EToolNotSuiRef: vector<u8> = b"Tool is not an on-chain (Sui) tool";
```

```move
#[error]
const EToolWitnessMismatch: vector<u8> = b"Tool witness does not match registered on-chain tool";
```

```move
#[error]
const EToolNotUnregistered: vector<u8> = b"Tool is not unregistered";
```

```move
#[error]
const EToolTimeoutOutOfBounds: vector<u8> = b"Tool timeout must be between 1 second and 2 minutes";
```

```move
#[error]
const EVerifierAlreadyConfigured: vector<u8> = b"Tool verifier support is already configured";
```

```move
#[error]
const EVerifierUnsupported: vector<u8> = b"DAG verifier mode is not supported by this Tool";
```

```move
#[error]
const EToolRegistryMismatch: vector<u8> = b"Tool belongs to another registry";
```

```move
#[error]
const EToolRegistryAdminMismatch: vector<u8> = b"Capability belongs to another Tool registry";
```

```move
#[error]
const EExternalVerifierNotRegistered: vector<u8> = b"Tool has no external verifier";
```

```move
#[error]
const EToolPackageMismatch: vector<u8> = b"Tool package does not match the expected package upgrade transition";
```

How much \[US] (in base units) to lock to register a tool.

TODO: This is only a testing value.

```move
const DEFAULT_US_COLLATERAL_TO_LOCK: u64 = 1;
```

How long is the collateral locked for in milliseconds after unregistering.

TODO: This is only a testing value.

```move
const DEFAULT_LOCK_DURATION_MS: u64 = 1;
```

What is the lower bound for tool timeouts in milliseconds.

```move
const TOOL_TIMEOUT_LOWER_BOUND_MS: u64 = 1000;
```

What is the upper bound for tool timeouts in milliseconds.

```move
const TOOL_TIMEOUT_UPPER_BOUND_MS: u64 = 120000;
```

Buffer added to tool timeout for leader evaluation.

```move
const LEADER_EVALUATION_BUFFER_MS: u64 = 5000;
```

#### Function `register_off_chain_tool`

Registers a new off-chain HTTP Tool with an immutable schema and invocation price. The registry enforces FQN uniqueness, schema validity, and timeout bounds; URL and FQN conventions remain caller/SDK responsibilities.

**Collateral**

To prevent spamming, we lock \[ToolRegistry.us\_collateral\_to\_lock] \[US] as collateral. If the tool is unregistered, the collateral is available after \[ToolRegistry.lock\_duration\_ms] milliseconds.

**Slashing**

The registry administrator may call \[`slash`] when the Tool fails to uphold its registered contract.

**Owner Cap**

The returned Tool owner capability must be transferred or otherwise consumed.

**Payment Tickets**

The returned payment capability controls invocation price and tickets.

```move
public fun register_off_chain_tool(self: &mut nexus_tool::tool_registry::ToolRegistry, fqn: std::ascii::String, url: vector<u8>, description: vector<u8>, meta_schema: nexus_interface::meta_schema::MetaSchema, timeout_ms: u64, invocation_cost_mist: u64, pay_with: &mut sui::coin::Coin<talus::us::US>, clock: &sui::clock::Clock, ctx: &mut sui::tx_context::TxContext): (nexus_tool::tool_registry::Tool, nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_cashier::OverToolCashier>)
```

#### Function `register_on_chain_tool`

Registers a new on-chain Tool with an immutable schema and invocation price.

Onchain Tools are published as separate Move modules. They must expose a public `execute` function that consumes \[`UIDRequirements`] followed by an owned `OnchainToolResult`. Workflow Tools may precede those arguments with an owned `ProvenValue<AgentVertexAuthorization>`. Public visibility lets the current Scheduler compose an older Tool package in one transaction. The Tool must satisfy its UID requirement and finalize the result in that same transaction.

**Owner Cap**

The returned Tool owner capability must be transferred or otherwise consumed.

```move
public fun register_on_chain_tool(self: &mut nexus_tool::tool_registry::ToolRegistry, package_address: address, module_name: std::ascii::String, fqn: std::ascii::String, description: vector<u8>, meta_schema: nexus_interface::meta_schema::MetaSchema, timeout_ms: u64, tool_witness_id: sui::object::ID, invocation_cost_mist: u64, pay_with: &mut sui::coin::Coin<talus::us::US>, clock: &sui::clock::Clock, ctx: &mut sui::tx_context::TxContext): (nexus_tool::tool_registry::Tool, nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_cashier::OverToolCashier>)
```

#### Function `register_on_chain_tool_with_workflow_authorization_cap`

Registers an on-chain Tool whose `execute` function requires a vertex authorization value first.

The caller/SDK must set this only after normalized signature analysis proves execute takes [`nexus_primitives::authorization::ProvenValue`](/talus-docs-v2.1.0/reference/move/nexus_primitives/authorization.md#nexus_primitives_authorization_ProvenValue)`<`[`nexus_interface::authorization::AgentVertexAuthorization`](/talus-docs-v2.1.0/reference/move/nexus_interface/authorization.md#nexus_interface_authorization_AgentVertexAuthorization)`>` first.

```move
public fun register_on_chain_tool_with_workflow_authorization_cap(self: &mut nexus_tool::tool_registry::ToolRegistry, package_address: address, module_name: std::ascii::String, fqn: std::ascii::String, description: vector<u8>, meta_schema: nexus_interface::meta_schema::MetaSchema, timeout_ms: u64, tool_witness_id: sui::object::ID, invocation_cost_mist: u64, pay_with: &mut sui::coin::Coin<talus::us::US>, clock: &sui::clock::Clock, ctx: &mut sui::tx_context::TxContext): (nexus_tool::tool_registry::Tool, nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_cashier::OverToolCashier>)
```

#### Function `unregister`

Atomically retires a Tool from every live registry lookup and verifier record.

```move
public fun unregister(self: &mut nexus_tool::tool_registry::Tool, registry: &mut nexus_tool::tool_registry::ToolRegistry, owner_cap: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, clock: &sui::clock::Clock)
```

#### Function `reregister_tool`

Re-register a previously unregistered tool.

Rebuilds base registry state with a fresh timeout and no verifier support, and snapshots the registry's current collateral-lock duration for the re-registered Tool.

```move
public fun reregister_tool(self: &mut nexus_tool::tool_registry::Tool, registry: &mut nexus_tool::tool_registry::ToolRegistry, owner_cap: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, pay_with: &mut sui::coin::Coin<talus::us::US>, timeout_ms: u64)
```

#### Function `claim_collateral`

Return collateral to a tool owner.

```move
public fun claim_collateral(self: &mut nexus_tool::tool_registry::Tool, owner_cap: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, clock: &sui::clock::Clock): sui::balance::Balance<talus::us::US>
```

#### Function `deescalate`

Returns a new \[CloneableOwnerCap] for the given tool but with the given generic type that doesn't have any permissions within this module. Works for both off-chain and on-chain Tools.

See also \[assert\_tool\_owner\_generic].

```move
public fun deescalate<T: drop>(self: &nexus_tool::tool_registry::Tool, owner_cap: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, witness: T, ctx: &mut sui::tx_context::TxContext): nexus_primitives::owner_cap::CloneableOwnerCap<T>
```

#### Function `delegate_cashier_admin`

Creates delegated cashier administration from full \[[`Tool`](#nexus_tool_tool_registry_Tool)] ownership.

```move
public fun delegate_cashier_admin(self: &nexus_tool::tool_registry::Tool, owner_cap: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, ctx: &mut sui::tx_context::TxContext): nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_cashier::OverToolCashier>
```

#### Function `assert_tool_owner_generic`

Assert that the owner cap is for the given tool but allows any generic type to be used.

See also \[deescalate].

```move
public fun assert_tool_owner_generic<T>(self: &nexus_tool::tool_registry::Tool, owner_cap: &mut nexus_primitives::owner_cap::CloneableOwnerCap<T>)
```

#### Function `did_unregister_period_pass`

Returns whether the collateral lock duration has elapsed since the tool was unregistered.

Returns `false` if the tool is still registered.

```move
public fun did_unregister_period_pass(self: &nexus_tool::tool_registry::Tool, clock: &sui::clock::Clock): bool
```

#### Function `is_registered`

Returns whether the tool is currently registered (not unregistered).

```move
public fun is_registered(self: &nexus_tool::tool_registry::Tool): bool
```

#### Function `is_verified`

Returns whether the tool has been marked verified by the slashing authority.

```move
public fun is_verified(self: &nexus_tool::tool_registry::Tool): bool
```

#### Function `assert_tool_registered`

Assert that a tool is registered and not unregistered.

```move
public fun assert_tool_registered(self: &nexus_tool::tool_registry::Tool)
```

#### Function `fqn`

Returns the fully qualified name of the tool.

```move
public fun fqn(self: &nexus_tool::tool_registry::Tool): std::ascii::String
```

#### Function `assert_registered_vertex`

Asserts a DAG vertex is bound to this registry's exact Tool ID and immutable schema.

```move
public fun assert_registered_vertex(self: &nexus_tool::tool_registry::ToolRegistry, dag_object: &nexus_interface::dag::DAG, vertex: nexus_interface::graph::Vertex)
```

#### Function `assert_registered_dag`

Asserts every DAG vertex still matches this registry's live Tool state.

```move
public fun assert_registered_dag(self: &nexus_tool::tool_registry::ToolRegistry, dag_object: &nexus_interface::dag::DAG)
```

#### Function `tool_timeout_ms`

Returns the configured timeout (in milliseconds) for the tool with the given FQN.

```move
public fun tool_timeout_ms(self: &nexus_tool::tool_registry::ToolRegistry, fqn: std::ascii::String): u64
```

#### Function `walk_timeout_ms_for_runtime_vertex`

Build the timeout window for a runtime DAG vertex.

```move
public fun walk_timeout_ms_for_runtime_vertex(self: &nexus_tool::tool_registry::ToolRegistry, dag_object: &nexus_interface::dag::DAG, vertex: nexus_interface::graph::RuntimeVertex): u64
```

#### Function `contains_tool`

Return whether a tool FQN is registered in this registry.

```move
public fun contains_tool(self: &nexus_tool::tool_registry::ToolRegistry, fqn: std::ascii::String): bool
```

#### Function `contains_tool_id`

```move
public fun contains_tool_id(self: &nexus_tool::tool_registry::ToolRegistry, tool_id: sui::object::ID): bool
```

#### Function `tool_id`

```move
public fun tool_id(self: &nexus_tool::tool_registry::ToolRegistry, fqn: std::ascii::String): sui::object::ID
```

#### Function `invocation_cost_mist`

Returns the current invocation price in MIST for a registered Tool.

```move
public fun invocation_cost_mist(self: &nexus_tool::tool_registry::ToolRegistry, fqn: std::ascii::String): u64
```

#### Function `snapshot_invocation_cost`

Records the current Tool price on an execution payment.

An unregistered Tool is snapshotted with a zero price so callers can preserve a complete execution snapshot before liveness is checked.

```move
public fun snapshot_invocation_cost(self: &nexus_tool::tool_registry::ToolRegistry, execution_payment: &mut nexus_interface::payment::ExecutionPayment, fqn: std::ascii::String)
```

#### Function `set_invocation_cost_mist`

Sets the invocation price in MIST using delegated \[`OverToolCashier`] authority.

```move
public fun set_invocation_cost_mist(self: &mut nexus_tool::tool_registry::ToolRegistry, tool: &nexus_tool::tool_registry::Tool, cashier_admin: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_cashier::OverToolCashier>, cost: u64)
```

#### Function `verifier_support`

```move
public fun verifier_support(self: &nexus_tool::tool_registry::ToolRegistry, tool_id: sui::object::ID): std::option::Option<nexus_interface::verifier::ToolVerifierSupport>
```

#### Function `supports_verifier_mode`

```move
public fun supports_verifier_mode(self: &nexus_tool::tool_registry::ToolRegistry, tool_id: sui::object::ID, mode: nexus_interface::verifier::ToolVerifierMode): bool
```

#### Function `add_vertex_to_dag`

Adds a DAG vertex bound to this registry's current stable Tool ID and immutable schema.

```move
public fun add_vertex_to_dag(self: &nexus_tool::tool_registry::ToolRegistry, dag_object: &mut nexus_interface::dag::DAG, dag_owner: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_interface::dag::OverDAG>, vertex: nexus_interface::graph::Vertex, kind: nexus_interface::graph::VertexKind)
```

#### Function `set_registered_vertex_verifier_mode`

Selects a per-vertex mode after checking the Tool's one global support value.

```move
public fun set_registered_vertex_verifier_mode(self: &nexus_tool::tool_registry::ToolRegistry, dag_object: &mut nexus_interface::dag::DAG, dag_owner: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_interface::dag::OverDAG>, vertex: nexus_interface::graph::Vertex, mode: nexus_interface::verifier::ToolVerifierMode)
```

#### Function `register_external_verifier`

Owner-authorized initial registration of one External verifier.

```move
public fun register_external_verifier(self: &mut nexus_tool::tool_registry::ToolRegistry, tool: &nexus_tool::tool_registry::Tool, owner_cap: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, registration: nexus_tool::external_verifier::ExternalVerifierRegistration)
```

#### Function `has_external_verifier`

Returns whether a Tool has external verifier configuration.

```move
public fun has_external_verifier(self: &nexus_tool::tool_registry::ToolRegistry, tool: sui::object::ID): bool
```

#### Function `external_verifier_method`

Returns the external verifier method configured for a Tool.

```move
public fun external_verifier_method(self: &nexus_tool::tool_registry::ToolRegistry, tool: sui::object::ID): nexus_interface::verifier::VerifierMethodId
```

#### Function `external_verifier_witness`

Returns the witness configured for a Tool external verifier.

```move
public fun external_verifier_witness(self: &nexus_tool::tool_registry::ToolRegistry, tool: sui::object::ID): sui::object::ID
```

#### Function `external_verifier_objects`

Returns the immutable shared objects configured for a Tool external verifier.

```move
public fun external_verifier_objects(self: &nexus_tool::tool_registry::ToolRegistry, tool: sui::object::ID): vector<sui::object::ID>
```

#### Function `on_chain_tool_takes_workflow_authorization_cap_first`

Return whether the registered on-chain tool requires workflow authorization cap as its first execute argument.

```move
public fun on_chain_tool_takes_workflow_authorization_cap_first(self: &nexus_tool::tool_registry::ToolRegistry, fqn: std::ascii::String): bool
```

#### Function `vertex_requires_authorization_grant`

Return whether a DAG runtime vertex requires a workflow authorization grant for execution.

```move
public fun vertex_requires_authorization_grant(self: &nexus_tool::tool_registry::ToolRegistry, dag_object: &nexus_interface::dag::DAG, vertex: nexus_interface::graph::RuntimeVertex): bool
```

#### Function `assert_on_chain_tool_witness`

Assert that `witness_id` is the witness registered for an on-chain tool.

```move
public fun assert_on_chain_tool_witness(self: &nexus_tool::tool_registry::ToolRegistry, fqn: std::ascii::String, witness_id: sui::object::ID)
```

#### Function `on_chain_tool_witness_id`

```move
public fun on_chain_tool_witness_id(self: &nexus_tool::tool_registry::ToolRegistry, fqn: std::ascii::String): sui::object::ID
```

#### Function `set_us_collateral_to_lock`

Sets the collateral in US base units required to register a Tool.

```move
public fun set_us_collateral_to_lock(self: &mut nexus_tool::tool_registry::ToolRegistry, admin: &nexus_tool::tool_registry::ToolRegistryAdminCap, new_us_collateral_to_lock: u64)
```

#### Function `set_lock_duration_ms`

Sets the collateral lock duration in milliseconds after Tool removal.

```move
public fun set_lock_duration_ms(self: &mut nexus_tool::tool_registry::ToolRegistry, admin: &nexus_tool::tool_registry::ToolRegistryAdminCap, new_duration_ms: u64)
```

#### Function `slash`

Takes given amount of collateral from a Tool. If the remaining collateral is below the registry's current `us_collateral_to_lock` requirement, an active Tool is retired; collateral exactly equal to that requirement keeps it active. Slashing an already retired Tool preserves its original retirement timestamp rather than restarting the collateral-lock period.

```move
public fun slash(self: &mut nexus_tool::tool_registry::Tool, registry: &mut nexus_tool::tool_registry::ToolRegistry, admin: &nexus_tool::tool_registry::ToolRegistryAdminCap, amount: u64, clock: &sui::clock::Clock): sui::balance::Balance<talus::us::US>
```

#### Function `set_verified`

Set a tool's verification status.

```move
public fun set_verified(self: &mut nexus_tool::tool_registry::Tool, registry: &nexus_tool::tool_registry::ToolRegistry, admin: &nexus_tool::tool_registry::ToolRegistryAdminCap, verified: bool)
```

#### Function `update_off_chain_tool_url`

Update the URL of an off-chain (HTTP) tool.

The tool must be registered and the caller must hold the owner cap.

```move
public fun update_off_chain_tool_url(self: &mut nexus_tool::tool_registry::Tool, owner_cap: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, new_url: vector<u8>)
```

#### Function `migrate_on_chain_tool_package`

Updates the package address of an active on-chain Tool using its bound owner capability.

```move
public fun migrate_on_chain_tool_package(self: &mut nexus_tool::tool_registry::Tool, owner_cap: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, target_package: address)
```

#### Function `update_tool_metadata`

Updates the mutable description of a registered Tool.

The registration-time \[`MetaSchema`] remains immutable because DAG bindings and the registry snapshot rely on that exact schema. Description changes require renewed verification.

```move
public fun update_tool_metadata(self: &mut nexus_tool::tool_registry::Tool, owner_cap: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, description: vector<u8>)
```

#### Function `update_tool_timeout`

Update a tool timeout.

The tool must be registered and the caller must hold the owner cap.

```move
public fun update_tool_timeout(self: &nexus_tool::tool_registry::Tool, registry: &mut nexus_tool::tool_registry::ToolRegistry, owner_cap: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>, timeout_ms: u64)
```

#### Function `configure_registered_key_support`

Declares registered key verifier support for a Tool.

Verification still requires live Tool and Leader key bindings.

```move
public fun configure_registered_key_support(registry: &mut nexus_tool::tool_registry::ToolRegistry, tool: &nexus_tool::tool_registry::Tool, owner_cap: &mut nexus_primitives::owner_cap::CloneableOwnerCap<nexus_tool::tool_authority::OverTool>)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.talus.network/talus-docs-v2.1.0/reference/move/nexus_tool/tool_registry.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
