--- title: 'DF0015: Agent Tool Already Registered' description: 'Agent tool "{id}" is already registered.' --- ## Message > Agent tool "`{id}`" is already registered. ## Cause `ctx.agent.registerTool()` was called with an `id` that collides with: - an already-registered agent tool, or - an RPC function whose `agent` field already exposes it under the same id. Agent tool ids must be unique across both sources so that `invoke(id, args)` has an unambiguous target. ## Fix Pick a distinct id or unregister the existing tool before re-registering: ```ts const handle = ctx.agent.registerTool({ id: 'my-tool', /* ... */ }) // later... handle.unregister() ctx.agent.registerTool({ id: 'my-tool', /* new config */ }) ``` ## Source - [`packages/devframe/src/node/host-agent.ts`](https://github.com/devframes/devframe/blob/main/packages/devframe/src/node/host-agent.ts): `ctx.agent.registerTool()` throws `DF0015` when the tool id collides with an existing agent tool or an RPC function's `agent` exposure.