Skip to main content
Glama

add_comment

Adds a Markdown comment to a pull request for review feedback, discussion, or threaded replies. Use it to document review notes directly on the PR.

Instructions

Add a comment to a pull request for review feedback or discussion.

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": {
      "repository": "<repository>",
      "prId": "<prId>",
      "text": "<text>"
    },
    "name": "add_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
prIdYesPull request ID to comment on.
textYesComment text (Markdown supported).
projectNoBitbucket project key (optional if default project configured).
parentIdNoParent comment ID for threaded replies.
repositoryYesRepository slug containing the pull request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden for a write operation. It says nothing about required permissions/scopes, whether the comment triggers notifications, whether the operation is idempotent or reversible, or what is returned; only the schema's parentId hints at threading behavior.

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?

A single front-loaded sentence with no filler; the intent clause is useful rather than redundant. Slight under-specification rather than verbosity is the only issue.

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

Completeness3/5

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

A five-parameter mutation tool with no annotations and no output schema warrants more than one sentence of guidance. Missing are the permission/auth context, return behavior (e.g., created comment ID), and how this differs from the inline-comment sibling.

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 optional project and parentId is already documented in the schema. The description adds no additional meaning such as constraints on text length, default project resolution, or threading semantics, so the baseline applies.

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?

States a specific verb and resource ("Add a comment to a pull request") plus the intent (review feedback or discussion). It does not explicitly distinguish itself from the sibling add_comment_inline, so an agent cannot tell from the description alone whether this creates a general PR comment versus an inline code comment.

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?

The phrase "for review feedback or discussion" implies a context for use, but there is no when-not guidance, no prerequisites (e.g., authentication or permissions), and no named alternative such as add_comment_inline for code-anchored comments.

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