- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::nsmcp::Tool
::nsmcp::Toolcreate ... \
[ -adminExample (default "") ] \
[ -adminSummary (default "") ] \
[ -description:required description:required ] \
[ -inputSchema (default " { "type": "object", "properties": {}, "additionalProperties": false } ") ] \
[ -name:required name:required ] \
[ -outputSchema (default "") ] \
[ -permission:required permission:required ]
Defined in /usr/local/ns/tcl/nsmcp/01-tools.tcl
Class Relations
- class: ::nx::Class
- superclass: ::nsmcp::Object
- subclass: ::nsmcp::LogErrorSummaryTool
, ::nsmcp::CodeQueryDefinitionTool
, ::nsmcp::LogTool
, ::nsmcp::ConfigurationTool
, ::nsmcp::ServerDescribe
, ::nsmcp::CodeDefinitionTool
, ::nsmcp::StatsTool
, ::nsmcp::AccessSummaryTool
, ::nsmcp::CodeSearchTool
, ::nsmcp::AccessDiagnosticTool
, ::nsmcp::CodeUpstreamTool
, ::nsmcp::RequestRoutingTool
Methods (to be applied on instances)
describe (scripted, public)
<instance of nsmcp::Tool> describe
Build the public MCP descriptor for this tool. Include the configured schemas and annotations using ns_json's typed representation.
- Returns:
- A rooted JSON object in typed triples.
- Testcases:
- No testcase defined.
execute (scripted, public)
<instance of nsmcp::Tool> execute context arguments
Declare the abstract tool execution contract. Concrete tools override this method; calling the base implementation raises an error.
- 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:
- No normal result; raises the abstract-method error.
- Testcases:
- No testcase defined.
name (scripted, public)
<instance of nsmcp::Tool> name
Return the tool's registered MCP name. The registry uses this configured name for discovery and dispatch.
- Returns:
- The tool name.
- Testcases:
- No testcase defined.
permission (scripted, public)
<instance of nsmcp::Tool> permission
Return the permission required to invoke this tool. The registry checks this grant against the request context before execution.
- Returns:
- The required permission name.
- Testcases:
- No testcase defined.
validate (scripted, public)
<instance of nsmcp::Tool> validate arguments
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.
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
![[i]](/resources/acs-subsite/ZoomIn16.gif)