REQ-MCP-016: Anti-spiral tracking warns softly then hard-blocks repeated identical tools

← Requirements

What it requires

  1. Given repeated calls of the same tool up to the hard-block threshold, When the next call arrives, Then it is rejected before dispatch with kind rejected_anti_spiral; Given the sentinel hard-block value, Then the effective threshold is the soft limit plus two.
tier
NOT_RUN

Where it lives

  • src/mcp5

See it on the map

How it is met

implemented byresults (58 tests)check_anti_spiral_hard_blockcheck_repeated_failurecheck_spiral_blockseffective_hard_block_thresholdupdate_anti_spiral_tracking58 absent58 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (58)

Reached through calls

58 tests: 58 absent

testresultlinked byimplementers exercisedcalls away
A call that fails identically is refused rather than retried absentinferred5 of 54
Anti-spiral hard block stops dispatch and emits absentinferred5 of 54
Anti-spiral hard block uses derived default when sentinel setabsentinferred5 of 54
Auto approve skips callbackabsentinferred5 of 54
Chained POST_TOOL_CALL hooks: last write winsabsentinferred5 of 54
Circuit breaker at threeabsentinferred5 of 54
Duplicate counter resetsabsentinferred5 of 54
Duplicate detection skipsabsentinferred5 of 54
Error result not cached for dedupabsentinferred5 of 54
Headless mode denies without callbackabsentinferred5 of 54
Max tool calls per turnabsentinferred5 of 54
Multiple tool calls in batchabsentinferred5 of 54
POST_TOOL_CALL fires on duplicate rejection with kindabsentinferred5 of 54
POST_TOOL_CALL fires on schema rejection with kindabsentinferred5 of 54
POST_TOOL_CALL hook transforms duplicate-rejection contentabsentinferred5 of 54
POST_TOOL_CALL hook transforms schema-rejection contentabsentinferred5 of 54
POST_TOOL_CALL hook transforms successful tool result contentabsentinferred5 of 54
POST_TOOL_CALL with *modified_json == NULL leaves content untouchedabsentinferred5 of 54
PRE/POST_TOOL_CALL fire for successful callsabsentinferred5 of 54
PRE_TOOL_CALL cancel short-circuits dispatch and still fires POSTabsentinferred5 of 54
Permission denied returns feedbackabsentinferred5 of 54
Process single tool callabsentinferred5 of 54
Schema validation rejects invalid enum valueabsentinferred5 of 54
Schema validation rejects missing required fieldabsentinferred5 of 54
Tool call history records successful executionsabsentinferred5 of 54
Tool emits directives → ToolExecutor extracts + dispatches themabsentinferred5 of 54
Tool executor processes calls via ServerManagerabsentinferred5 of 54
effective_max_tool_calls_per_turn overrides global limitabsentinferred5 of 54
gh#111: POST_TOOL_CALL hook returning malformed UTF-8 is absentinferred5 of 54
gh#143: an argument-free call serialises as an object absentinferred5 of 54
gh#143: an argument-free call to a no-required-fields tool absentinferred5 of 54
gh#143: dispatch converts a throwing tool into a tool errorabsentinferred5 of 54
gh#168: a rewritten payload carrying bad UTF-8 is sanitized, absentinferred5 of 54
gh#168: the rewrite is visible to the dup cache and POST hookabsentinferred5 of 54
gh#190: a structured JSON error counts as a failure everywhereabsentinferred5 of 54
gh#211: a tier that declares an EMPTY allowlist may call nothingabsentinferred5 of 54
gh#83: allowlisted tool dispatches normallyabsentinferred5 of 54
gh#83: empty locked_tier bypasses enforcementabsentinferred5 of 54
gh#83: no map wired = pass-through (pre-v2.5.2 behavior)absentinferred5 of 54
gh#83: off-allowlist tool is rejected_unauthorized at dispatchabsentinferred5 of 54
gh#83: tier with no allowlist entry is unrestrictedabsentinferred5 of 54
mcp.bash.timeout_seconds reaches the dispatched bash serverabsentinferred5 of 54
process_single_call completes with locked_tier setabsentinferred5 of 54
v2.14.0: schema validation enforces declared minimum and maximumabsentinferred5 of 54
v2.14.6: a headless host still dispatches engine directivesabsentinferred5 of 54
gh#158: a delegated child's read satisfies its parent's write — absentinferred5 of 55
gh#158: a session's tool call never resolves inside another absentinferred5 of 55
gh#158: repeated sandbox swaps race nothing a concurrent absentinferred5 of 55
gh#158: two sessions reading and writing through ONE filesystem absentinferred5 of 55
gh#158: two sessions writing todos through ONE entropic server absentinferred5 of 55
gh#168: a PRE_TOOL_CALL hook's modified args reach the toolabsentinferred5 of 55
gh#168: a malformed modification is refused, not half-appliedabsentinferred5 of 55
gh#168: a modification that renames the tool is refusedabsentinferred5 of 55
gh#168: a non-zero return still cancels, modification or notabsentinferred5 of 55
gh#158: clearing the default conversation releases the default absentinferred5 of 56
gh#158: each session's todo list is its ownabsentinferred5 of 56
gh#158: ending a session's conversation releases its read absentinferred5 of 56
gh#158: read-before-write is judged per session — another absentinferred5 of 56