::nsmcp::Tool ::nsmcp::Tool describe execute init jsonArguments name permission validate ::nsmcp::Object ::nsmcp::Object dict getdef ::nsmcp::Tool->::nsmcp::Object ::nsmcp::ServerDescribe ::nsmcp::ServerDescribe execute ::nsmcp::ServerDescribe->::nsmcp::Tool

Class ::nsmcp::ServerDescribe

::nsmcp::ServerDescribe[i] create ... \
           [ -adminExample (default "") ] \
           [ -adminSummary (default "") ] \
           [ -description:required description:required ] \
           [ -inputSchema (default " { "type": "object", "properties": {}, "additionalProperties": false } ") ] \
           [ -name:required name:required ] \
           [ -outputSchema (default "{} object { type string object properties object { server object {type string string} naviserverVersion object {type string string} patchlevel object {type string string} tclVersion object {type string string} nxVersion object {type string string} moduleVersion object {type string string} observedAt object {type string string} } required array {0 string server 1 string naviserverVersion 2 string patchlevel 3 string tclVersion 4 string nxVersion 5 string moduleVersion 6 string observedAt} additionalProperties boolean false }") ] \
           [ -permission:required permission:required ]

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

Class Relations

  • class: ::nx::Class[i]
  • superclass: ::nsmcp::Tool[i]
::nx::Class create ::nsmcp::ServerDescribe \
     -superclass ::nsmcp::Tool

Methods (to be applied on instances)

  • execute (scripted, public)

     <instance of nsmcp::ServerDescribe[i]> execute context arguments

    Describe the selected NaviServer instance and MCP module. Use runtime module metadata and an observation timestamp; do not read configuration secrets.

    Parameters:
    context (required)
    Authenticated request context carrying the principal, grants and selected server.
    arguments (required)
    Rooted ns_json typed triples for the tool's JSON argument object.
    Returns:
    A rooted JSON tool-result object, including availability or job metadata as appropriate.

    Testcases:
    No testcase defined.
    set version unknown
    set modules [ns_server -server [$context server] modules]
    if {[dict exists $modules nsmcp version]} {
        set version [dict get $modules nsmcp version]
    }
    return [list {} object [list server string [$context server]  naviserverVersion string [ns_info version]  patchlevel string [ns_info patchlevel] tclVersion string [info patchlevel]  nxVersion string [package require nx]  moduleVersion string $version  observedAt string [clock format [clock seconds] -timezone UTC -format {%Y-%m-%dT%H:%M:%SZ}]]]