| outline | deep |
|---|
::: warning Experimental The agent-native surface is experimental and may change without a major version bump until it stabilizes. :::
Agent tool "
{id}" is already registered.
ctx.agent.registerTool() was called with an id that collides with:
- an already-registered agent tool, or
- an RPC function whose
agentfield 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.
Pick a distinct id or unregister the existing tool before re-registering:
const handle = ctx.agent.registerTool({ id: 'my-tool', /* ... */ })
// later...
handle.unregister()
ctx.agent.registerTool({ id: 'my-tool', /* new config */ })packages/devframe/src/node/host-agent.ts—ctx.agent.registerTool()throwsDF0015when the tool id collides with an existing agent tool or an RPC function'sagentexposure.