REQ-MCP-012: Tool calls pass an ordered precondition pipeline with typed rejection kinds

← Requirements

What it requires

  1. Given a tool call that violates more than one precondition, When preconditions are checked, Then the earliest gate in the documented order produces the rejection and its kind; the delegate call sorts to the end of a mixed batch; a batch longer than the effective limit is truncated to that limit.
tier
NOT_RUN

Where it lives

  • src/mcp15

See it on the map

How it is met

implemented byresults (58 tests)check_anti_spiral_hard_blockcheck_approvalcheck_approval_pccheck_call_preconditionscheck_dup_or_approvalcheck_mcp_authorizationcheck_tier_allowedprocess_single_callprocess_tool_callsrequires_approvalrequires_approvalrequires_approvalshould_stop_batchsort_tool_callstruncate_to_limit58 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 absentinferred12 of 151
Anti-spiral hard block stops dispatch and emits absentinferred12 of 151
Anti-spiral hard block uses derived default when sentinel setabsentinferred12 of 151
Auto approve skips callbackabsentinferred12 of 151
Chained POST_TOOL_CALL hooks: last write winsabsentinferred12 of 151
Circuit breaker at threeabsentinferred12 of 151
Duplicate counter resetsabsentinferred12 of 151
Duplicate detection skipsabsentinferred12 of 151
Error result not cached for dedupabsentinferred12 of 151
Headless mode denies without callbackabsentinferred12 of 151
Max tool calls per turnabsentinferred12 of 151
Multiple tool calls in batchabsentinferred12 of 151
POST_TOOL_CALL fires on duplicate rejection with kindabsentinferred12 of 151
POST_TOOL_CALL fires on schema rejection with kindabsentinferred12 of 151
POST_TOOL_CALL hook transforms duplicate-rejection contentabsentinferred12 of 151
POST_TOOL_CALL hook transforms schema-rejection contentabsentinferred12 of 151
POST_TOOL_CALL hook transforms successful tool result contentabsentinferred12 of 151
POST_TOOL_CALL with *modified_json == NULL leaves content untouchedabsentinferred12 of 151
PRE/POST_TOOL_CALL fire for successful callsabsentinferred12 of 151
PRE_TOOL_CALL cancel short-circuits dispatch and still fires POSTabsentinferred12 of 151
Permission denied returns feedbackabsentinferred12 of 151
Process single tool callabsentinferred12 of 151
Schema validation rejects invalid enum valueabsentinferred12 of 151
Schema validation rejects missing required fieldabsentinferred12 of 151
Tool call history records successful executionsabsentinferred12 of 151
Tool emits directives → ToolExecutor extracts + dispatches themabsentinferred12 of 151
Tool executor processes calls via ServerManagerabsentinferred12 of 151
effective_max_tool_calls_per_turn overrides global limitabsentinferred12 of 151
gh#111: POST_TOOL_CALL hook returning malformed UTF-8 is absentinferred12 of 151
gh#143: an argument-free call serialises as an object absentinferred12 of 151
gh#143: an argument-free call to a no-required-fields tool absentinferred12 of 151
gh#143: dispatch converts a throwing tool into a tool errorabsentinferred12 of 151
gh#168: a rewritten payload carrying bad UTF-8 is sanitized, absentinferred12 of 151
gh#168: the rewrite is visible to the dup cache and POST hookabsentinferred12 of 151
gh#190: a structured JSON error counts as a failure everywhereabsentinferred12 of 151
gh#211: a tier that declares an EMPTY allowlist may call nothingabsentinferred12 of 151
gh#83: allowlisted tool dispatches normallyabsentinferred12 of 151
gh#83: empty locked_tier bypasses enforcementabsentinferred12 of 151
gh#83: no map wired = pass-through (pre-v2.5.2 behavior)absentinferred12 of 151
gh#83: off-allowlist tool is rejected_unauthorized at dispatchabsentinferred12 of 151
gh#83: tier with no allowlist entry is unrestrictedabsentinferred12 of 151
mcp.bash.timeout_seconds reaches the dispatched bash serverabsentinferred12 of 151
process_single_call completes with locked_tier setabsentinferred12 of 151
v2.14.0: schema validation enforces declared minimum and maximumabsentinferred12 of 151
v2.14.6: a headless host still dispatches engine directivesabsentinferred12 of 151
gh#158: a delegated child's read satisfies its parent's write — absentinferred12 of 152
gh#158: a session's tool call never resolves inside another absentinferred12 of 152
gh#158: repeated sandbox swaps race nothing a concurrent absentinferred12 of 152
gh#158: two sessions reading and writing through ONE filesystem absentinferred12 of 152
gh#158: two sessions writing todos through ONE entropic server absentinferred12 of 152
gh#168: a PRE_TOOL_CALL hook's modified args reach the toolabsentinferred12 of 152
gh#168: a malformed modification is refused, not half-appliedabsentinferred12 of 152
gh#168: a modification that renames the tool is refusedabsentinferred12 of 152
gh#168: a non-zero return still cancels, modification or notabsentinferred12 of 152
gh#158: clearing the default conversation releases the default absentinferred12 of 153
gh#158: each session's todo list is its ownabsentinferred12 of 153
gh#158: ending a session's conversation releases its read absentinferred12 of 153
gh#158: read-before-write is judged per session — another absentinferred12 of 153