Skip to main content
Glama

Comment on a build's diff

post_comment

Leave a review comment on one of a build's changed-story diffs (resolve the build by commitSha/prNumber/buildId, target the diff by diffResultId from get_build/get_diff). The comment is authored as the agent. Optionally anchor it to a spot on the candidate image with anchor: omit or null for a whole-diff comment, {type:'point',x,y} to pin a point, {type:'rect',x,y,w,h} for a box, or {type:'path',points:[{x,y},...],closed} for a shape - all coordinates 0..1 normalized to the candidate image. side picks the pane ('after' the candidate, default; 'before' the baseline). Pass parentId (a root comment id from list_comments) to REPLY in that thread instead - a reply inherits the root's side and carries no anchor, so anchor/side are ignored. A new root comment is refused when a newer build exists on the branch (comment on the latest build); replies stay allowed. Reference: https://uiverify.ai/docs/mcp-tools

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "diffResultId": "<diffResultId>",
      "body": "<body>"
    },
    "name": "post_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesThe comment text.
sideNoWhich pane: 'after' (candidate, default) or 'before' (baseline). Ignored on a reply.
anchorNoWhere on the candidate image to pin it (0..1 normalized): omit/null = whole diff; {type:'point',x,y}; {type:'rect',x,y,w,h}; {type:'path',points,closed}. Ignored on a reply.
buildIdNoResolve this exact build id.
parentIdNoReply to this thread ROOT comment's id (from list_comments) instead of starting a new thread.
prNumberNoResolve the latest build for this PR number.
commitShaNoResolve the build for this git commit SHA.
projectIdNoThe project to look in (a projectId from list_projects). Needed only when you can access several projects; a buildId already names its project.
diffResultIdYesThe diff result to comment on (from get_build/get_diff).

Output Schema

NameRequiredDescriptionDefault
idYes
openReviewCommentsNoPresent when open review comments are waiting on some branch of this project; read yours with list_comments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / openReviewComments
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Present when open review comments are waiting on some branch of this project; read yours with list_comments.",
      +  "properties": {
      +    "branches": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "branch": {
      +            "type": "string"
      +          },
      +          "lastActivityAt": {
      +            "type": "string"
      +          },
      +          "open": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "branch",
      +          "open",
      +          "lastActivityAt"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "branchesTotal": {
      +      "type": "number"
      +    },
      +    "hint": {
      +      "type": "string"
      +    },
      +    "projectId": {
      +      "type": "string"
      +    },
      +    "total": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "total",
      +    "branches",
      +    "branchesTotal",
      +    "projectId",
      +    "hint"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / anchor / anyOf
      Previous value: -[
      -  {
      -    "anyOf": [
      -      {
      -        "additionalProperties": false,
      -        "properties": {
      -          "type": {
      -            "const": "point",
      -            "type": "string"
      -          },
      -          "x": {
      -            "maximum": 1,
      -            "minimum": 0,
      -            "type": "number"
      -          },
      -          "y": {
      -            "$ref": "#/properties/anchor/anyOf/0/anyOf/0/properties/x"
      -          }
      -        },
      -        "required": [
      -          "type",
      -          "x",
      -          "y"
      -        ],
      -        "type": "object"
      -      },
      -      {
      -        "additionalProperties": false,
      -        "properties": {
      -          "h": {
      -            "exclusiveMinimum": 0,
      -            "maximum": 1,
      -            "type": "number"
      -          },
      -          "type": {
      -            "const": "rect",
      -            "type": "string"
      -          },
      -          "w": {
      -            "exclusiveMinimum": 0,
      -            "maximum": 1,
      -            "type": "number"
      -          },
      -          "x": {
      -            "$ref": "#/properties/anchor/anyOf/0/anyOf/0/properties/x"
      -          },
      -          "y": {
      -            "$ref": "#/properties/anchor/anyOf/0/anyOf/0/properties/x"
      -          }
      -        },
      -        "required": [
      -          "type",
      -          "x",
      -          "y",
      -          "w",
      -          "h"
      -        ],
      -        "type": "object"
      -      },
      -      {
      -        "additionalProperties": false,
      -        "properties": {
      -          "closed": {
      -            "type": "boolean"
      -          },
      -          "points": {
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "x": {
      -                  "$ref": "#/properties/anchor/anyOf/0/anyOf/0/properties/x"
      -                },
      -                "y": {
      -                  "$ref": "#/properties/anchor/anyOf/0/anyOf/0/properties/x"
      -                }
      -              },
      -              "required": [
      -                "x",
      -                "y"
      -              ],
      -              "type": "object"
      -            },
      -            "maxItems": 512,
      -            "minItems": 2,
      -            "type": "array"
      -          },
      -          "type": {
      -            "const": "path",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "type",
      -          "points",
      -          "closed"
      -        ],
      -        "type": "object"
      -      }
      -    ]
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "anyOf": [
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "type": {
      +            "const": "point",
      +            "type": "string"
      +          },
      +          "x": {
      +            "maximum": 1,
      +            "minimum": 0,
      +            "type": "number"
      +          },
      +          "y": {
      +            "maximum": 1,
      +            "minimum": 0,
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "x",
      +          "y"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "h": {
      +            "exclusiveMinimum": 0,
      +            "maximum": 1,
      +            "type": "number"
      +          },
      +          "type": {
      +            "const": "rect",
      +            "type": "string"
      +          },
      +          "w": {
      +            "exclusiveMinimum": 0,
      +            "maximum": 1,
      +            "type": "number"
      +          },
      +          "x": {
      +            "maximum": 1,
      +            "minimum": 0,
      +            "type": "number"
      +          },
      +          "y": {
      +            "maximum": 1,
      +            "minimum": 0,
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "x",
      +          "y",
      +          "w",
      +          "h"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "closed": {
      +            "type": "boolean"
      +          },
      +          "points": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "x": {
      +                  "maximum": 1,
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                "y": {
      +                  "maximum": 1,
      +                  "minimum": 0,
      +                  "type": "number"
      +                }
      +              },
      +              "required": [
      +                "x",
      +                "y"
      +              ],
      +              "type": "object"
      +            },
      +            "maxItems": 512,
      +            "minItems": 2,
      +            "type": "array"
      +          },
      +          "type": {
      +            "const": "path",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "points",
      +          "closed"
      +        ],
      +        "type": "object"
      +      }
      +    ]
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Changed1 schema field changed
    • addedInput schema / properties / projectId
      Added value: +{
      +  "description": "The project to look in (a projectId from list_projects). Needed only when you can access several projects; a buildId already names its project.",
      +  "format": "uuid",
      +  "type": "string"
      +}
  4. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say it is a non-destructive, non-idempotent write. The description adds real behavioral context beyond that: the comment is authored as the agent, replies inherit the root's side and carry no anchor (so `anchor`/`side` are silently ignored), and root comments are rejected on stale builds. That stale-build refusal is a constraint an agent could not infer from schema or annotations.

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?

Front-loaded with purpose, then build resolution, then anchoring, then reply mode, then the refusal rule — a logical order with no filler sentences. It is a dense single paragraph and repeats the anchor variant list that the schema already enumerates, costing some tightness.

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

Completeness5/5

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

For a 9-parameter mutation tool with an output schema, the description covers the resolution path, the targeting path, anchoring geometry, reply semantics, and the failure condition. Nothing an agent needs in order to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds semantics the schema does not spell out: the point/rect/path anchor shapes with 0..1 normalization to the candidate image, the 'after' default for `side`, and the inheritance rule making `anchor`/`side` moot on replies. It largely restates the anchor union the schema already defines, which keeps it from a 5.

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?

Opens with a specific verb and resource: "Leave a review comment on one of a build's changed-story diffs." It immediately distinguishes the two modes of operation (new root comment vs. threaded reply via `parentId`), which no sibling tool covers.

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

Usage Guidelines5/5

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

Explicitly routes the agent to other tools for prerequisites: resolve the build via commitSha/prNumber/buildId, get `diffResultId` from get_build/get_diff, get `parentId` from list_comments. It also states a genuine when-not condition — new root comments are refused when a newer build exists on the branch, while replies stay allowed.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources