nsmcp::Tool method jsonArguments (protected)
<instance of nsmcp::Tool> jsonArguments arguments
Defined in /usr/local/ns/tcl/nsmcp/01-tools.tcl
Convert a JSON argument object in ns_json's rooted typed-triples representation to NX named arguments, using inputSchema types. The input is a three-element Tcl list: name, type, members, where type is object and members is a sequence of name/type/value triples. It is not serialized JSON text or an ordinary Tcl dictionary. Parse JSON text first with ns_json parse -output triples. Check JSON types before Tcl/NX can coerce strings to numbers or booleans. This is not a general JSON Schema validator: NX handles defaults/required parameters; method bodies handle ranges, enums and cross-parameter constraints. Structured values retain their rooted typed triples so nested JSON types are not discarded.
- Parameters:
- arguments (required)
- Rooted typed triples for a JSON object, as returned by ns_json parse -output triples; serialized JSON is not accepted.
- Returns:
- Tcl list of NX named arguments (-name value pairs).
- Testcases:
- No testcase defined.
![[i]](/resources/acs-subsite/ZoomIn16.gif)