Skip to main content
Glama

audit_pr

Audit a PR diff against a project's active rules and lessons. Persists an audit record and returns rules/lessons for LLM classification.

Instructions

Audit a PR diff against a project's active rules and lessons (detail="full"): persists an audit record (SHA-256 diff hash + a snapshot of the rule versions evaluated) and returns the diff plus rules/lessons for the calling LLM to classify.

Access level: analyze. Returns: JSON with audit_id, pr_diff, rules, lessons, and an instruction_for_client.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pr_diffYesThe PR's unified diff text.
project_idYesProject id whose active rules/lessons to audit against.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden and does reasonably well: it states the tool persists an audit record (SHA-256 diff hash plus a rule-version snapshot), declares 'Access level: analyze', and enumerates the response contents. It does not state permission prerequisites or reversibility, and the stray detail="full" reference muddies the picture, but the mutation/persistence behavior is disclosed.

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?

The purpose is front-loaded and the total length is reasonable for a tool with persistence semantics. The parenthetical '(detail="full")' and the trailing 'Returns:' line are somewhat redundant against the output schema, but there is no significant padding.

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?

An output schema exists, so explaining return fields is arguably redundant rather than necessary, and the description nonetheless gives a full picture of the persist-and-return workflow. The gaps are routing guidance among siblings and the unresolved detail="full" reference, not core operational knowledge.

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?

Schema coverage is 100%, so the baseline would be 3, but the description actively harms parameter understanding: it references a detail="full" mode that does not exist in the schema (only pr_diff and project_id, with additionalProperties: false), so an agent may attempt an invalid argument. It adds no meaning to the two real parameters beyond the schema.

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?

The description gives a specific verb+resource: audit a PR diff against a project's active rules and lessons, and clarifies it persists an audit record and returns diff/rules for the calling LLM to classify. This is clear and distinct from read-only siblings like get_rule_audit_log, though it never names a sibling or explicitly states how it differs from close neighbors such as check_feature_against_rules or analyze_pr_feedback.

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 only implied: the workflow (persist a record, then hand rules/diff to the LLM for classification) tells an agent roughly what the call accomplishes. There is no explicit when-to-use vs. when-not guidance and no routing to alternatives such as check_feature_against_rules for a simple single-check, which matters given ~25 siblings.

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