Skip to main content
Glama

agentguard — policy proxy for agent tool calls

okgate_set_policy

DestructiveIdempotent

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 okgate_create_proxy
policyYamlYesthe complete policy document; it replaces the current one rather than merging

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds genuinely new context: validation happens before saving, propagation takes up to 30 seconds, and an account key is required. It stops short of describing failure behavior or whether the prior policy is retained on error.

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?

Two compact sentences with zero filler; the verb, resource, and YAML scope are front-loaded, followed by the operational facts (validation, latency, auth). Every clause 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?

With no output schema, the description still covers the essentials an agent needs: the full-replacement semantics, validation gate, propagation delay, and auth requirement. Minor gaps remain around error/rollback behavior for a destructive write.

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% with both parameters documented, so the baseline is 3. The description goes further by enumerating the policy YAML's constituent sections, giving real semantic content about what policyYaml must contain beyond the schema's 'complete policy document' note.

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?

States a specific verb and resource ('Replace a proxy's policy') and enumerates the policy document's sections (mode, upstreams, classify, caps, etc.), so the scope is unambiguous. It does not explicitly contrast itself with the sibling okgate_create_proxy, which the rubric reserves for a 5.

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: it operates on an existing proxy (proxyId from okgate_create_proxy) and replaces rather than merges. However, there is no explicit when-to-use/when-not guidance or comparison against alternatives, and no statement about what happens if validation fails.

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.