Skip to main content
Glama
jiseong-choi

Commit Conventional Message Court (CCMCP)

by jiseong-choi

Render Verdict

court.render_verdict

Analyzes code changes and commit messages to generate structured verdicts that improve documentation clarity and adherence to conventional commit standards.

Instructions

Render the courtroom opinion for a commit message case.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subjectYesCommit subject line to put on trial.
bodyNoOptional commit body.
diffYesUnified diff or patch text.
pr_bodyNoOptional PR description.
styleNoCourtroom voice preset.
languageNoRendered verdict language.

Implementation Reference

  • src/server.ts:54-65 (registration)
    Tool registration for court.render_verdict.
    server.registerTool(
      "court.render_verdict",
      {
        title: "Render Verdict",
        description: "Render the courtroom opinion for a commit message case.",
        inputSchema: toolInputShape,
        outputSchema: z.record(z.unknown())
      },
      async (args) => {
        const verdict = renderVerdict(courtInputSchema.parse(args));
        return asToolResult(verdict, false);
      }
  • Handler logic for court.render_verdict, calling evaluateCourtCase.
    export function renderVerdict(input: CourtInput): CourtVerdict {
      return evaluateCourtCase({ ...input, style: input.style ?? "judge" });
    }
  • Core logic for evaluating a court case and generating a verdict.
    export function evaluateCourtCase(input: CourtInput): CourtVerdict {
      const style = normalizeStyle(input.style);
      const language = normalizeLanguage(input.language);
      const summary = parseDiff(input.diff);
      const { score, charges, findings, requiredActions, evidence } = buildFindings(input, summary);
      const verdict: Verdict = score >= 80 ? "approved" : score >= 60 ? "probation" : "convicted";
      const rewrites = buildRewrites(input, summary);
    
      const result: CourtVerdict = {
        verdict,
        score,
        charges,
        findings,
        evidence,
        sentence: sentenceFor(verdict, language),
        required_actions:
          verdict === "approved" ? requiredActions.filter((item) => item !== "Add or cite tests that prove the change.") : requiredActions,
        rewritten_subject: verdict === "approved" ? undefined : rewrites.rewritten_subject,
        rewritten_body: verdict === "approved" ? undefined : rewrites.rewritten_body,
        rewritten_pr_body: verdict === "approved" ? undefined : rewrites.rewritten_pr_body,
        rendered_opinion: ""
      };
    
      result.rendered_opinion = renderVerdictOpinion(result, style, language);
      return result;
    }
Behavior2/5

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

No annotations provided, so description carries full disclosure burden. It fails to indicate what the tool returns (presumably a string containing the verdict text), whether it has side effects, or if it calls external services. 'Render' implies generation but lacks specifics on output format.

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?

Single sentence of 9 words is efficiently structured and front-loaded. However, extreme brevity is detrimental given the 6-parameter complexity and lack of output schema—every word earns its place, but there aren't enough of them.

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

Completeness2/5

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

Incomplete for a 6-parameter tool with no output schema. The description omits return value specification, courtroom metaphor explanation, and workflow context with siblings. Relies entirely on schema for parameter understanding.

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?

With 100% schema description coverage, the schema adequately documents all 6 parameters. The description adds minimal semantic context beyond the schema, though 'courtroom opinion' loosely hints at the 'style' enum purpose. Baseline score appropriate given schema quality.

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 uses specific verb 'Render' and resource 'courtroom opinion' within the commit message domain. It hints at the courtroom metaphor aligning with sibling tools, though it could more explicitly differentiate from 'prosecute_commit' (arguments) vs this tool (final judgment).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance provided on when to use this versus 'court.prosecute_commit' or 'court.require_better_subject'. The workflow relationship between these three tools is unclear from the description alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jiseong-choi/CCMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server