Skip to main content
Glama

evaluate_threshold

Read-onlyIdempotent

Computes the Storey Threshold escalation rate for approval gates and returns current rate, status, and recommendations to maintain healthy governance levels.

Instructions

Compute the Storey Threshold — escalation rate (gates required / total operations). Returns current rate, status, and recommendations. Healthy band 10-18% is a design heuristic, not empirically validated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that registers and implements the evaluate_threshold MCP tool. It uses engine.thresholdMonitor.getReading(), engine.healthAssessor.assess(), and engine.thresholdMonitor.getBreakdown() to compute the Storey Threshold and returns escalation rate, status, recommendation, and breakdown.
    export function registerEvaluateThresholdTool(server: McpServer, engine: GovernanceEngine): void {
      server.tool(
        'evaluate_threshold',
        'Compute the Storey Threshold — escalation rate (gates required / total operations). Returns current rate, status, and recommendations. Healthy band 10-18% is a design heuristic, not empirically validated.',
        {},
        { title: 'Evaluate Storey Threshold', readOnlyHint: true, idempotentHint: true, destructiveHint: false, openWorldHint: false },
        async () => {
          const reading = engine.thresholdMonitor.getReading();
          const health = engine.healthAssessor.assess();
          const breakdown = engine.thresholdMonitor.getBreakdown();
    
          // Tool accountability tracking
          engine.telemetryService.emitToolCall('evaluate_threshold', `threshold-${Date.now().toString(36)}`, 'INFORMATIONAL', true);
    
          return {
            content: [{ type: 'text' as const, text: JSON.stringify({
              escalationRate: `${(reading.escalationRate * 100).toFixed(1)}%`,
              healthyBand: '10-18%',
              status: reading.status,
              isHealthy: reading.isHealthy,
              windowSize: reading.windowSize,
              breakdown,
              recommendation: health.recommendation,
              actionRequired: health.actionRequired,
              severity: health.severity,
            }, null, 2) }],
          };
        }
      );
    }
  • Import and registration of the evaluate_threshold tool in the MCP server's TOOL_REGISTRY, categorized as 'public' tier visibility.
    import { registerEvaluateThresholdTool } from './tools/evaluate-threshold.js';
    import { registerScoreGovernanceTool } from './tools/score-governance.js';
    import { registerAuditPipelineTool } from './tools/audit-pipeline.js';
    import { registerMonitorAgentsTool } from './tools/monitor-agents.js';
    import { registerMapComplianceTool } from './tools/map-compliance.js';
    import { registerAssessRiskTierTool } from './tools/assess-risk-tier.js';
    import { registerGenerateReportTool } from './tools/generate-report.js';
    import { registerSystemStatusTool } from './tools/system-status.js';
    import { registerApproveGateTool } from './tools/approve-gate.js';
    import { registerAgentRightsTool } from './tools/agent-rights.js';
    import { registerPrecedentTools } from './tools/precedent.js';
    import { registerCitizenshipTools } from './tools/citizenship.js';
    import { registerBranchAuthorityTools } from './tools/branchAuthority.js';
    import { registerColonyTools } from './tools/colony.js';
    import { registerMemoryPackTools } from './tools/memory-packs.js';
    import { registerValueMetricsTools } from './tools/value-metrics.js';
    import { registerSRTTools } from './tools/srt.js';
    import { registerVerifyLedgerTool } from './tools/verify-ledger.js';
    import { registerExportLedgerTool } from './tools/export-ledger.js';
    import { registerRemediationPackTools } from './tools/remediation-packs.js';
    import { registerPhoenixRecoveryTools } from './tools/phoenix-recovery.js';
    import { registerGovernedRetrievalTools } from './tools/governed-retrieval.js';
    import { registerContextAuthorityTool } from './tools/context-authority.js';
    import { registerInstitutionTools } from './tools/institution.js';
    import { registerContextReviveTool } from './tools/context-revive.js';
    import { registerGovernedSamplingTool } from './tools/governed-sampling.js';
    import { registerChainOfReasoningTools } from './tools/chain-of-reasoning.js';
    import { GovernedSampling } from '../core/sampling/index.js';
    
    // Runtime accountability instrumentation — wraps server.tool() registrations
    // so every invocation is bookended with startSession()/endSession().
    import { wrapServerWithRuntimeAccountability } from './runtime-accountability-wrapper.js';
    
    // Import resource handlers
    import { registerResources } from './resources/index.js';
    
    // Import prompt handlers
    import { registerPrompts } from './prompts/index.js';
    
    // ============================================================================
    // Tool Visibility Tiers — Tenant Isolation for External MCP Clients
    // ============================================================================
    //
    // Three tiers control which tools are registered per session:
    //   PUBLIC   — stateless scoring/classification tools, safe for any external client
    //   TENANT   — tools that access data, filtered by tenant ID (professional+ tier)
    //   OPERATOR — internal infrastructure tools (local stdio only, never exposed externally)
    //
    // The Smithery gateway and all HTTP clients get PUBLIC by default.
    // Paying customers (professional/enterprise DB keys) get PUBLIC + TENANT.
    // Local stdio (Claude Code / Claude Desktop) gets all tiers (OPERATOR).
    // ============================================================================
    
    export type ToolVisibility = 'public' | 'tenant' | 'operator';
    
    /**
     * Maps each tool registration function to its visibility tier.
     * Grouped by the tier each set of tools belongs to.
     */
    const TOOL_REGISTRY: Array<{
      tier: ToolVisibility;
      register: (server: McpServer, engine: GovernanceEngine) => void;
      description: string;
    }> = [
      // --- PUBLIC: Stateless governance scoring — no data exposure ---
      { tier: 'public', register: registerClassifyDecisionTool, description: 'classify_decision' },
      { tier: 'public', register: registerEvaluateThresholdTool, description: 'evaluate_threshold' },
  • Accountability profile for evaluate_threshold: toolClass='read', riskTier='low', maiDefault='INFORMATIONAL', no human approval required, governance category.
    { toolName: 'evaluate_threshold',  toolClass: 'read',     riskTier: 'low',      maiDefault: 'INFORMATIONAL',  requiresHumanApproval: false, category: 'governance' },
  • Prompt instructions referencing evaluate_threshold as a tool to use for governance health assessment (4 occurrences across various prompt templates).
      `4. Use evaluate_threshold to check governance health.`,
      `5. Summarize findings with specific recommendations for governance configuration.`,
    ].join('\n'),
  • Onboarding documentation listing evaluate_threshold under the Classification category of available tools.
    | Classification | classify_decision, evaluate_threshold, score_governance |
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate read-only, idempotent behavior. The description adds value by specifying return values (rate, status, recommendations) and the caveat that the healthy band is a design heuristic.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences are efficient and front-loaded: first states the core computation, then return values, then a heuristic note. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter read-only tool, the description adequately covers purpose, output (rate, status, recommendations), and a caveat. Without output schema, it could detail output structure more, but complexity is low.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist; baseline score of 4 applies. The description correctly requires no input and does not need to compensate for schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool computes the Storey Threshold (escalation rate) and returns current rate, status, and recommendations. The verb 'Compute' and resource 'Storey Threshold' are specific, distinguishing it from sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool vs. siblings. The heuristic note provides some context but not usage scenarios or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/knowledgepa3/gia-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server