Skip to main content
Glama

Generate an approved-server policy

generate_policy
Read-only

Create a .mcp-security.json policy that approves current MCP servers with pinned versions and flags later additions as shadow servers. Read-only; commit it to enforce CI and audit checks.

Instructions

Returns a .mcp-security.json policy that approves exactly the MCP servers configured now (and their remote hosts) and requires pinned versions. Commit it to the repository so CI, session checks and audits flag any server added later that is not on the list (shadow MCP servers). Read-only: returns the JSON, does not write it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_dirNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.1/5.0
Behavior4/5

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

The readOnlyHint annotation is confirmed and reinforced ('Read-only: returns the JSON, does not write it'), and the description adds substantive behavior: exactly what the policy approves, that it pins versions, and its downstream enforcement role. It stops short of 5 only because it says nothing about the returned JSON's shape or any size/limit caveats.

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 sentences, each doing distinct work: what is returned, how to use it, and the read-only guarantee. The most important information (the artifact produced) is front-loaded with no filler.

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 correctly specifies that it returns JSON rather than writing it, and explains the policy's enforceability downstream. The only meaningful omission is the undocumented project_dir parameter and whether it defaults to the current working directory.

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

Parameters2/5

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

There is one parameter (project_dir) with 0% schema description coverage, and the description never mentions it or explains what directory it should point at or what the default is. Since the schema does no work here, the description needed to compensate and does not.

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 precise verb and artifact: it returns a .mcp-security.json policy approving the currently configured MCP servers and their remote hosts, with pinned versions. This is clearly distinguishable from siblings like list_mcp_servers or pin_tools, which read or mutate state rather than emit a policy file.

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

Usage Guidelines4/5

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

The description gives a clear operative context: commit the returned file to the repository so CI, session checks and audits flag later-added shadow servers. It does not explicitly name an alternative or state a when-not condition, so it stops short of a 5, but the intended workflow is unambiguous.

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