Skip to main content
Glama

set_policy

Destructive

Create or update a RabbitMQ policy with an optional dry-run preview; the recorded undo restores prior fields or deletes a newly created policy.

Instructions

[WRITE][risk=medium] Create/update a rabbitmq policy; reversible.

Reads the policy first: the recorded undo restores the prior policy fields, or deletes the policy when it is newly created. Pass dry_run=True to preview.

Args: vhost: The policy's vhost (the default vhost is '/'). name: Policy name. pattern: Regex the policy matches queue/exchange names against. definition: Policy definition object (e.g. {'max-length': 100000}). priority: Policy priority (higher wins; default 0). apply_to: 'queues', 'exchanges', or 'all' (default). dry_run: If True, preview without changing. target: rabbitmq target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
nameYes
vhostYes
targetNo
dry_runNo
patternYes
apply_toNoall
priorityNo
definitionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: it discloses the read-first behavior, the undo semantics (restores prior fields or deletes if newly created), reversibility, and the dry_run preview. This is exactly the kind of behavioral context an agent needs for a mutating tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded tags and a tight behavioral paragraph, then a clean Args list. Slightly verbose repetition of field meaning but every line carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-param mutation tool with no output schema and 0% schema coverage, the description covers behavior, reversibility, preview, and all parameters. It does not describe successful return shape or error cases, but the undo/preview disclosure is the higher-value context here.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden. It documents every parameter including non-obvious ones (default vhost '/', apply_to enum values, priority semantics, definition example, target resolution), giving real meaning the bare schema lacks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Create/update a rabbitmq policy') and distinguishes itself from the sibling delete_policy by framing the operation as create/update. The [WRITE] tag and risk annotation front-load the action type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage through the WRITE tag and the dry_run preview hint, but never explicitly states when to use this versus list_policies, delete_policy, or other mutation siblings. No exclusions or prerequisites stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.