Skip to main content
Glama

Comment on an issue or pull request

comment_on_issue

Posts a Markdown comment on a Forgejo issue or pull request using the repository owner, name, and issue number; check prior comments before retrying to avoid duplicate posts.

Instructions

Post a comment on an issue or pull request (they share one numbering), as the write token's account; requires write mode. The body is Markdown and is public on a public repo: @mentions notify those users, and everyone watching the issue is notified. Not idempotent: calling twice posts twice, so check list_issue_comments before retrying a call whose result you did not see. Answers with the new comment in list_issue_comments' shape (id, user, body, created_at, url). To close, reopen or relabel, use edit_issue; for a pull-request review with a verdict, create_pull_request_review.

Input Schema

NameRequiredDescriptionDefault
bodyYesComment body (Markdown).
repoYesRepository name.
indexYesIssue or pull-request number.
ownerYesRepository owner.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.22.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare the safety profile, yet the description adds substantive context: it posts as the write token's account, requires write mode, is public on a public repo, notifies @mentions and all watchers, and is non-idempotent so a duplicate call posts twice. That is exactly the side-effect information an agent needs before a write.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

Front-loaded with the action, then side effects, then the retry caveat, then sibling routing — each sentence carries distinct, actionable information with no filler.

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?

No output schema exists, and the description compensates by naming the return shape (new comment in list_issue_comments' shape with id, user, body, created_at, url). Combined with auth mode, side effects, and alternatives, nothing needed to invoke 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 goes beyond it by clarifying that index is the shared issue/PR number and that body is Markdown with public visibility and mention semantics. Owner/repo are left to the schema, which is fine given full coverage.

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?

Specific verb plus resource ("post a comment on an issue or pull request") with the added detail that issues and PRs share one numbering, which resolves a real ambiguity. It is clearly distinguished from edit_issue and create_pull_request_review later in the text.

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 elsewhere: edit_issue for close/reopen/relabel and create_pull_request_review for a verdict-bearing review. It also gives a retry procedure (check list_issue_comments before retrying) that directly follows from the non-idempotent behavior.

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