mcp-toolcall-policy-mcp
v0.1.0Authors and tests mcp-toolcall-policy policies from pasted text.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
evaluate_policy Evaluate Policy
Decide one tool call against a pasted policy, as the PreToolUse hook would. Use this to check what a policy decides for a sample call while writing or testing it. Paste the policy YAML and a Claude Code PreToolUse hook input as JSON text. Returns the decision (allow, deny, or ask), the rule id, the reason, and the hook's exit code. Use explain_decision instead to see why each rule did or did not match, and lint_policy to check a policy without a call. This tool does not enforce anything on other tools, and "allow" is not a safety verdict. Responses never contain argument values or input keys.
| Parameter | Type | Description |
|---|---|---|
hook_input_json * | string | |
policy_yaml * | string |
explain_decision Explain Decision
Explain a decision: the result of every candidate rule and predicate for one call. Use this when a pasted policy decides a sample call differently than expected. Paste the policy YAML and a Claude Code PreToolUse hook input as JSON text. Returns the decision plus a trace per candidate rule (matched or not, each predicate's result, whether extra input keys blocked an allow/ask rule). Use evaluate_policy when only the decision is needed. This tool does not enforce anything on other tools, and "allow" is not a safety verdict. The trace names policy args and operators only, never argument values…
| Parameter | Type | Description |
|---|---|---|
hook_input_json * | string | |
policy_yaml * | string |
lint_policy Lint Policy
Validate a pasted policy and list its warnings, like `mcp-toolcall-policy validate`. Use this first when writing or changing a policy. Paste the policy YAML. Returns whether it is valid, its rule count, errors (a fixed code and a structural location such as rules[2].when[0]), and warnings (a fixed code and the rule id): wildcard allow rules with no conditions, and shadowed or unreachable rules. Use evaluate_policy or explain_decision to test a policy against a sample call. This tool does not enforce anything on other tools. Responses never repeat policy text other than rule ids.
| Parameter | Type | Description |
|---|---|---|
policy_yaml * | string |