Skip to main content
Glama

Draft PR comment with hints and style nits

format_pr_review
Read-onlyIdempotent

Assembles a single Markdown PR review comment from diff analysis and review-packet data, including rule findings, style nits, and optional functional notes; it does not post the comment.

Instructions

Build a single markdown PR comment from check_diff output and build_review_packet: static tool summary, heuristic candidate-rule table, Ceph idiom hints, CodingStyle nits, and optional functional bullets. Does not post anywhere.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "format_pr_review"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootNoRepo root for relative paths in the markdown.
scopeNoOne line: merge-base..head and file list.
titleNoHeading for the comment, e.g. the PR title.
packetNoResult from build_review_packet (needs `hunks`).
profileNoReview profile: 'default' (plain SEI CERT), 'ceph' (Ceph severities, suppressions and idioms), 'misra' (MISRA C:2012 + MISRA C++:2023), 'autosar' (AUTOSAR C++14) or an absolute path to a profile .yaml file.ceph
check_resultNoFull object returned by check_diff (tools, findings, warnings, summary).
functional_notesNoExtra functional review bullets; omit to auto-suggest from packet code.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety bar is low; the description still adds useful context by stating 'Does not post anywhere', which tells the agent the produced comment is a draft it must deliver itself. It also enumerates the output composition, going beyond the structured fields. It does not say what happens when the optional inputs (packet, check_result) are omitted, which is the main behavioral unknown for an all-optional tool.

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 tight sentences, front-loaded with the core action and the input sources, followed by the section list as a compact enumeration. Zero filler and no repetition of schema content.

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 seven all-optional parameters, an output schema and full annotations, the description covers what the tool produces and what it does not do (post). The remaining gap is degenerate-input behavior — whether calling with no arguments yields an empty/degraded comment — which matters given that nothing is required.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented in structured form; this sets the baseline at 3. The description only lightly reinforces semantics, noting the comment is built from check_diff output and the review packet and that functional bullets are optional. It adds little the schema does not already say.

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?

Specific verb+resource ('Build a single markdown PR comment') with an explicit list of the sections it composes (tool summary, candidate-rule table, Ceph idiom hints, CodingStyle nits, functional bullets) and the two upstream tools whose output it consumes. It also distances itself from the posting tools via 'Does not post anywhere'. What it leaves unstated is how it differs from sibling format_findings, which by name occupies adjacent territory.

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 through data dependencies: an agent can infer it runs after check_diff and build_review_packet since it consumes their output. There is no explicit when-to-use/when-not statement or named alternative (e.g., 'use review_pr to actually post the comment', or when to prefer format_findings). The guidance is inferable but not spelled out.

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