Skip to main content
Glama

Draft PR comment with hints and style nits

format_pr_review
Read-onlyIdempotent

Builds a markdown PR review comment from diff check results and review packets, showing rule candidates, Ceph idioms, style nits, and functional notes. Does not post.

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).
github_footerNoAppend collapsible footer: pull_request_target, mcp, or github-action. Omit to skip.
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. Addedv1.4.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety bar is low; the description still adds real behavior context by clarifying no posting occurs and by disclosing the packet dependency ('needs `hunks`'). It does not mention failure modes when required inputs are omitted, which keeps it below 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One packed sentence plus a short scope-limiting clause, front-loaded with the action and artifact. The middle list of output sections is dense but each item earns its place by telling the agent what will appear in the markdown; nothing is redundant 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 an output schema present, return values need not be explained, yet the description still characterizes the comment's structure, which helps the agent decide whether the output is suitable. Combined with a fully documented 8-parameter schema and clear annotations, the definition is sufficiently complete, though it could note behavior when packet or check_result is null.

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 including profile, github_footer and functional_notes is already documented in the schema. The description only echoes the two upstream input objects at a high level and adds no syntax, precedence, or format detail beyond that, which matches the baseline of 3.

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?

The description opens with a specific verb and artifact ('Build a single markdown PR comment') and enumerates the exact sections produced (tool summary, candidate-rule table, Ceph idiom hints, CodingStyle nits, functional bullets). It also names its upstream siblings (check_diff, build_review_packet), so an agent can separate it from review_pr or format_findings without opening the schema.

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?

'Does not post anywhere' sets the boundary between this drafting step and any posting/side-effecting workflow, and the explicit consumption of check_diff and build_review_packet output implies when in the pipeline to call it. It stops short of naming an explicit alternative or exclusion condition (e.g., use format_findings for non-PR output), so it is clear context without full routing guidance.

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