nsmcp::ToolRegistry method fingerprint (public)

 <instance of nsmcp::ToolRegistry[i]> fingerprint name

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

Hash a registered tool's permission and descriptor. Question conversations use this bounded descriptor fingerprint to detect a changed tool definition.

Parameters:
name (required)
Registered MCP tool name whose descriptor is pinned.
Returns:
The hexadecimal SHA-256 fingerprint; unknown tools raise an error.

Testcases:
No testcase defined.
Source code:
:refreshProviders
if {![dict exists ${:tools} $name]} {
    error "Unknown question tool"
}
set tool [dict get ${:tools} $name]
set data [list [$tool permission] [ns_json value -- [$tool describe]]]
if {[string bytelength $data]>1048576} {
    error "Question tool descriptor exceeds limit"
}
return [ns_crypto::md string -digest sha256 -- $data]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: