nsmcp::Tool method validate (public)
<instance of nsmcp::Tool> validate arguments
Defined in /usr/local/ns/tcl/nsmcp/01-tools.tcl
Validate the base tool's empty argument object. Subclasses with arguments override this contract alongside their input schema; invalid input raises an RPC argument error.
- Parameters:
- arguments (required)
- Rooted ns_json typed triples for the tool's JSON argument object.
- Returns:
- An empty result on success.
- Testcases:
- No testcase defined.
Source code: # The first tool accepts exactly {}. Subclasses must override this # together with inputSchema; no partial JSON Schema validator is claimed. if {[lindex $arguments 1] ne "object" || [lindex $arguments 2] ne ""} { return -code error -errorcode {NSMCP RPC -32602} "Expected an empty arguments object" }XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)