Run the Apier dry-run validator against a proposed regulatory action without producing ANY upstream side effect — no Maskinporten call, no Altinn / Skatteetaten / NAV submission. The response is the structured verdict from src/lib/actions/dry-run.ts carrying: the five check slots (company_exists,...
Risk signalsAccepts raw HTML/template content (payload) · Bulk/mass operation — affects multiple targets
Part of the Mcp server.
Free to start. No card required.
AI agents call validate_action to retrieve information from Mcp without modifying any data. This is common in research, monitoring, and reporting workflows where the agent needs context before taking action. Because read operations don't change state, they are generally safe to allow without restrictions -- but you may still want rate limits to control API costs.
Even though validate_action only reads data, uncontrolled read access can leak sensitive information or rack up API costs. An agent caught in a retry loop could make thousands of calls per minute. A rate limit gives you a safety net without blocking legitimate use.
Read-only tools are safe to allow by default. No rate limit needed unless you want to control costs.
{
"version": "1",
"default": "deny",
"tools": {
"validate_action": {}
}
} See the full Mcp policy for all 13 tools.
These attack patterns abuse exactly the kind of access validate_action gives an agent. Each links to the full case and the policy that stops it:
Other read tools across the catalogue. The same approach applies to each: allow, with a rate cap to control cost.
Run the Apier dry-run validator against a proposed regulatory action without producing ANY upstream side effect — no Maskinporten call, no Altinn / Skatteetaten / NAV submission. The response is the structured verdict from src/lib/actions/dry-run.ts carrying: the five check slots (company_exists, system_user_authorised, scopes_delegated, deadline_in_future, data_format_valid) each with pass / fail / skipped status and a human-readable reason; the overall valid boolean; and the DRY_RUN_DISCLAIMER constant — a passing dry-run is NOT a guarantee of upstream success, only a strong-but-not-guaranteed signal that the local prerequisites are satisfied. The dry-run response also echoes would_be_payload — the exact upstream-shaped payload a live execute would submit — plus a preview_notice, so you can preview precisely what would be filed without submitting anything. Checks short-circuit deterministically: scopes_delegated is skipped when system_user_authorised fails (no delegation to inspect); each skipped check carries an explanation. Use this tool BEFORE calling the live execute path to catch missing delegations, expired scopes, deadline misses, and payload-shape errors with zero upstream cost. Inputs match the underlying /v1/actions/execute body schema exactly: { org_number, action_type, period, payload }. action_type is the closed enum mva_melding (VAT return) | a_melding (employer report). period encoding depends on action_type — for mva_melding accept YYYY-T1..T6 (bimonthly), YYYY-A (annual), or YYYY-MM (monthly); for a_melding only YYYY-MM. payload is the upstream-shaped JSON for the action; the per-action discriminated Zod (in src/lib/actions/payload-schemas.ts) owns shape validation — this tool only caps size at 64 KiB UTF-8 bytes (PAYLOAD_TOO_LARGE on exceedance). Failure modes: SCOPE_INSUFFICIENT if the API key is not scoped read:actions; VALIDATION_FAILED on shape / mod-11 / action_type enum / period-regex / payload-size; the dry-run validator itself NEVER throws — every failed check is reported via valid=false plus the breakdown fields. Required scope: read:actions (matches the underlying /v1/actions/execute endpoint — dry-run shares the live-execute scope vocabulary).. It is categorised as a Read tool in the Mcp MCP Server, which means it retrieves data without modifying state.
Register the MCP server in PolicyLayer and add a rule for validate_action: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp. Nothing to install.
validate_action is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the validate_action rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for validate_action. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
validate_action is provided by the MCP server (https://www.apier.no/api/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Deterministic rules across all 13 Mcp tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.
Free to start. No card required.
4,600+ MCP servers and 31,000+ tools scanned and risk-classified.