evaluate_threshold
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
| Name | Required | Description | Default |
|---|---|---|---|
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) }], }; } ); } - src/mcp/server.ts:27-93 (registration)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' }, - src/core/audit/telemetry.ts:164-164 (schema)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' }, - src/mcp/prompts/index.ts:45-47 (helper)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 |