Skip to main content
Glama
naoanao

Safe AI Agent — Guard Checks

by naoanao

Audit Api Keys

audit_api_keys

Audit API keys for over-privilege using permission descriptions only. Returns per-key risk levels with reasons and a summary count.

Instructions

Audit API keys for over-privilege using permission descriptions only.

Pass entries like {"name": "stripe-main", "service": "Stripe", "scopes": ["charges:write", "refunds:write"]}. NEVER pass actual key values — entries that look like secrets are rejected, not stored. Returns a per-key risk level with reasons and a summary count.

Input Schema

NameRequiredDescriptionDefault
keysYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses a security behavior (secret-like entries are rejected, not stored), which is exactly the kind of non-obvious trait an agent needs. It also previews the return shape (per-key risk level with reasons plus a summary count). It omits any statement about side effects, persistence of the audit results, or cost, keeping it short of a 5.

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?

Four short sentences, front-loaded with the purpose, then the input example, then the hard constraint, then the return shape. The inline example earns its space by defining an otherwise opaque schema; nothing is redundant.

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

Completeness5/5

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

An output schema exists so return values need not be spelled out, yet the description still summarizes them. For a single-parameter tool whose inner object is untyped, the example fills the main gap, and the security constraint covers the biggest misuse risk. Nothing critical is missing for correct invocation.

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 0% and the items are untyped objects with additionalProperties: true, so the schema alone tells an agent nothing. The description compensates by showing the entry shape with name, service, and scopes keys. It does not state which of those fields are required or how extra fields are treated, so it falls short of full compensation.

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 and resource ("Audit API keys for over-privilege") plus the crucial qualifier that the audit works from permission descriptions rather than live credentials. This is instantly distinguishable from the sibling tools about idempotency and guard patterns.

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?

Implies the use case clearly (checking keys for over-privilege) and provides a concrete exclusion: "NEVER pass actual key values — entries that look like secrets are rejected, not stored." It does not explicitly say when to prefer a sibling tool or what input qualifies as a description, but the operating context is unambiguous.

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