Prosecute Commit
court.prosecute_commitAnalyze commit messages against code changes to ensure clarity and adherence to conventional commit standards, returning structured feedback for improvement.
Instructions
Put a commit subject and diff on trial and return a structured verdict.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subject | Yes | Commit subject line to put on trial. | |
| body | No | Optional commit body. | |
| diff | Yes | Unified diff or patch text. | |
| pr_body | No | Optional PR description. | |
| style | No | Courtroom voice preset. | |
| language | No | Rendered verdict language. |
Implementation Reference
- src/server.ts:26-38 (registration)Tool "court.prosecute_commit" registration in the McpServer.
server.registerTool( "court.prosecute_commit", { title: "Prosecute Commit", description: "Put a commit subject and diff on trial and return a structured verdict.", inputSchema: toolInputShape, outputSchema: z.record(z.unknown()) }, async (args) => { const verdict = prosecuteCommit(courtInputSchema.parse(args)); return asToolResult(verdict, verdict.verdict === "convicted"); } ); - src/court/shared.ts:4-6 (handler)The main handler function for "court.prosecute_commit", which calls evaluateCourtCase.
export function prosecuteCommit(input: CourtInput): CourtVerdict { return evaluateCourtCase({ ...input, style: input.style ?? "prosecutor" }); }