Set conditional redirect rules on a URL QR code. Rules are evaluated top-to-bottom; each rule has an array of conditions (AND logic) — all must match. First matching rule's URL is used. If no rule matches, the default target_url applies. Conditions: 'device' (mobile/tablet/desktop), 'os' (iOS/And...
AI agents use set_redirect_rules to create or update resources in QR for Agent — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your QR for Agent environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
rules | array | Yes | Array of redirect rules. Empty array to clear all rules. |
short_id | string | Yes | The short ID of the QR code (must be type='url'). |
Parameters from the server's own tool schema.
This tool modifies QR code redirect rules—a configuration change that is reversible. It does not execute arbitrary code, delete QR codes themselves, or commit financial transactions. The blast radius is medium: an AI agent could misconfigure redirects (e.g., point users to phishing sites, wrong regions, or malicious URLs), causing misdirection but not data loss or financial harm.
From the tool's definition Tool description states 'Set conditional redirect rules' — a modify/update operation on QR code configuration. The tool updates redirect behavior and can remove rules via empty array, making it a reversible data modification.
Attacks that exploit this kind of access
Set conditional redirect rules on a URL QR code. Rules are evaluated top-to-bottom; each rule has an array of conditions (AND logic) — all must match. First matching rule's URL is used. If no rule matches, the default target_url applies. Conditions: 'device' (mobile/tablet/desktop), 'os' (iOS/Android/Windows/macOS/Linux), 'country' (ISO alpha-2 like 'FR'), 'language' (ISO 639-1 like 'fr'), 'time_range' ({start:'09:00',end:'17:00',timezone:'Europe/Paris'}), 'ab_split' ({percentage:50}). Combine conditions in a single rule for AND logic (e.g. mobile + FR). Pass an empty array to remove all rules. It is categorised as a Write tool in the QR for Agent MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
set_redirect_rules accepts 2 parameters: rules, short_id. Required: rules, short_id. The full parameter table on this page comes from the server's own tool schema.
Register the QR for Agent MCP server in PolicyLayer and add a rule for set_redirect_rules: 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 QR for Agent. Nothing to install.
set_redirect_rules is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the set_redirect_rules 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 set_redirect_rules. 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.
set_redirect_rules is provided by the QR for Agent MCP server (qr-for-agent). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →