::nsmcp::Object ::nsmcp::Object dict getdef ::nsmcp::Tool ::nsmcp::Tool describe execute init jsonArguments name permission validate ::nsmcp::Tool->::nsmcp::Object ::nsmcp::LogErrorSummaryTool ::nsmcp::LogErrorSummaryTool execute options validate ::nsmcp::LogErrorSummaryTool->::nsmcp::Tool ::nsmcp::CodeQueryDefinitionTool ::nsmcp::CodeQueryDefinitionTool execute options validate ::nsmcp::CodeQueryDefinitionTool->::nsmcp::Tool ::nsmcp::LogTool ::nsmcp::LogTool arguments execute validate ::nsmcp::LogTool->::nsmcp::Tool ::nsmcp::ConfigurationTool ::nsmcp::ConfigurationTool credentialParameter execute options sections validate value ::nsmcp::ConfigurationTool->::nsmcp::Tool ::nsmcp::ServerDescribe ::nsmcp::ServerDescribe execute ::nsmcp::ServerDescribe->::nsmcp::Tool ::nsmcp::CodeDefinitionTool ::nsmcp::CodeDefinitionTool execute options validate ::nsmcp::CodeDefinitionTool->::nsmcp::Tool ::nsmcp::StatsTool ::nsmcp::StatsTool available encode unavailable ::nsmcp::StatsTool->::nsmcp::Tool ::nsmcp::AccessSummaryTool ::nsmcp::AccessSummaryTool execute options validate ::nsmcp::AccessSummaryTool->::nsmcp::Tool ::nsmcp::CodeSearchTool ::nsmcp::CodeSearchTool execute options validate ::nsmcp::CodeSearchTool->::nsmcp::Tool ::nsmcp::AccessDiagnosticTool ::nsmcp::AccessDiagnosticTool accumulateTraffic aggregateKey argumentTriples classify configuredSlowPath contextComplete evidencePriority execute init logDirectory modules nativeClassify options page recordFields scanBounds scanStep seekSample source trafficTriples validate ::nsmcp::AccessDiagnosticTool->::nsmcp::Tool ::nsmcp::CodeUpstreamTool ::nsmcp::CodeUpstreamTool candidates commit compare comparison describe execute get http mappings options selectDefinition source validate ::nsmcp::CodeUpstreamTool->::nsmcp::Tool ::nsmcp::RequestRoutingTool ::nsmcp::RequestRoutingTool contextSupported encodeSnapshot execute mapped snapshot ::nsmcp::RequestRoutingTool->::nsmcp::Tool ::nsmcp::AccessFileSummaryTool ::nsmcp::AccessFileSummaryTool execute options ::nsmcp::AccessFileSummaryTool->::nsmcp::LogErrorSummaryTool ::nsmcp::ServerRuntime ::nsmcp::ServerRuntime execute mode schedulerDiagnostics validate ::nsmcp::ServerRuntime->::nsmcp::StatsTool ::nsmcp::ServerTopology ::nsmcp::ServerTopology execute ::nsmcp::ServerTopology->::nsmcp::StatsTool ::nsmcp::ServerHistory ::nsmcp::ServerHistory compactHistory execute options validate ::nsmcp::ServerHistory->::nsmcp::StatsTool

Class ::nsmcp::Tool

::nsmcp::Tool[i] create ... \
           [ -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[i]
  • superclass: ::nsmcp::Object[i]
  • subclass: ::nsmcp::LogErrorSummaryTool[i], ::nsmcp::CodeQueryDefinitionTool[i], ::nsmcp::LogTool[i], ::nsmcp::ConfigurationTool[i], ::nsmcp::ServerDescribe[i], ::nsmcp::CodeDefinitionTool[i], ::nsmcp::StatsTool[i], ::nsmcp::AccessSummaryTool[i], ::nsmcp::CodeSearchTool[i], ::nsmcp::AccessDiagnosticTool[i], ::nsmcp::CodeUpstreamTool[i], ::nsmcp::RequestRoutingTool[i]

Methods (to be applied on instances)

  • describe (scripted, public)

     <instance of nsmcp::Tool[i]> 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[i]> 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[i]> 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[i]> 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[i]> 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.