Skip to main content
Glama

agentguard — policy proxy for agent tool calls

agentguard_set_policy

Idempotent

Replace a proxy's policy (YAML: mode, upstreams, classify, caps, loop, dry_run, approvals, alerts, chaos, drift). Validated before saving; takes effect within 30 seconds. Requires an account key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proxyIdYesthe proxy id returned by agentguard_create_proxy
policyYamlYesthe complete policy document; it replaces the current one rather than merging

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / policyYaml / description
      Added value: +"the complete policy document; it replaces the current one rather than merging"
    • addedInput schema / properties / proxyId / description
      Added value: +"the proxy id returned by agentguard_create_proxy"
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations cover the write-safety profile (readOnlyHint=false, idempotentHint=true, destructiveHint=false), and the description still adds real behavioral context: validation before saving, a 30-second propagation window, and an account-key auth requirement. Only the full-replace (non-merge) semantics and error behavior on invalid YAML are left out.

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

Conciseness5/5

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

Three short, front-loaded sentences with zero filler: what it does, what the payload looks like, then validation/latency/auth constraints in descending order of importance.

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?

With no output schema and a two-param mutation tool, the description supplies the operational facts an agent needs (auth, validation, effect latency). It is slightly thin on failure modes and on whether the replaced policy can be retrieved beforehand, but nothing critical is missing.

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 coverage is 100%, so the baseline is 3, and the description earns credit by naming the policy sections (mode, upstreams, classify, caps, loop, dry_run, approvals, alerts, chaos, drift) that the YAML string must contain. This gives the agent a concrete mental model of the payload beyond the schema's "complete policy document".

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

Purpose4/5

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

Starts with a specific verb+resource ("Replace a proxy's policy") and enumerates the YAML sections the policy document covers, so the scope is unambiguous. It does not explicitly contrast itself with siblings like agentguard_create_proxy, but the replace-vs-create distinction is inferable from the names.

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?

Usage is implied (mutate an existing proxy's policy) and one prerequisite is stated ("Requires an account key"), but there is no explicit when-to-use vs when-not, and no routing to alternatives such as agentguard_create_proxy for a proxy that does not yet exist.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.