registerTools(bindings) | Local registrations (localKey, descriptor, handler) | Bound descriptors | Register application-owned handlers; no model request |
unregisterTools({ toolIds }) | Registered tool IDs | void | Retire local bindings; previously held descriptors can become stale |
connectServers(configs, options?) | Trusted ServerConfig[]; optional signal/timeout | void | Connect stdio or Streamable HTTP servers owned by the router |
disconnectServers({ serverIds, ... }) | Server IDs and optional signal/timeout | void | Remove server bindings; refresh selected inventories |
discover({ refresh?, ... }?) | Optional explicit refresh, signal and timeout | Bound descriptors | Inspect current registered tools and server inventories |
filterTools({ prompt, tools?, model?, ranker?, context?, ... }) | Selection options | RankedTool[] | Retrieve without dispatch; lexical unless a ranker or named .ranking adapter is chosen |
call({ toolId, arguments, expectedSnapshot?, context?, ... }) | Exact tool ID and JSON arguments | ExecutionResult | Governed exact call; no model inference |
execute({ prompt, tools?, model?, context?, ... }) | Intent and selected sources | ExecutionResult | Propose, validate and potentially dispatch at most one call |
close() | None | void | Release instance-owned resources in finally |