nsmcp::ToolRegistry method register (public)

 <instance of nsmcp::ToolRegistry[i]> register tool

Defined in /usr/local/ns/tcl/nsmcp/01-tools.tcl

Register a tool object under its configured name. Reject duplicate names so dispatch cannot silently replace an existing registration.

Parameters:
tool (required)
Tool object to register.
Returns:
The updated internal registration dictionary.

Testcases:
No testcase defined.
Source code:
set name [$tool name]
if {[dict exists ${:tools} $name]} {
    error "duplicate tool: $name"
}
dict set :tools $name $tool
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: