Skip to main content
Glama

Add PR inline comment

add_pr_inline_comment

Post a comment on a specific file and line within a pull request's diff to provide targeted feedback during code review.

Instructions

Post a comment on a specific file and line within a pull request's diff. Use get_pr_diff first if you need to confirm line numbers are present in the diff. For general PR comments, use add_pr_comment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesComment body (Markdown).
lineYesLine number (1-based).
pathYesRepo-relative file path.
repoNoBitbucket repo slug.
sideNoWhich side of the diff to anchor to. Default `new` (the PR's version).
pr_idNoPull request id.
workspaceNoBitbucket workspace (slug).
Behavior4/5

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

Annotations already indicate mutating (readOnlyHint=false) and non-destructive (destructiveHint=false). The description adds the critical behavioral nuance that the comment anchors to a specific diff line and that line numbers must exist in the diff, going beyond annotation basics. It doesn't detail side effects like notifications or edits, but no contradictions exist.

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?

Two short sentences with no filler. The first sentence states the action, the second provides usage guidance. Front-loaded and efficient.

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?

Given a straightforward mutation tool with good schema coverage and annotations, the description covers the essential context: what it does, when to prepare with `get_pr_diff`, and how it differs from `add_pr_comment`. With no output schema, the description adequately supports correct invocation.

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% with clear descriptions for all 7 parameters, setting a baseline of 3. The description adds value by explaining the semantics of `line` ('confirm line numbers are present in the diff') and implicitly mapping 'specific file and line' to `path` and `line` parameters, providing guidance beyond the schema.

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?

The description states a specific action ('Post a comment on a specific file and line within a pull request's diff') with a clear verb and resource. It distinguishes itself from the sibling `add_pr_comment` (general comments) and other comment-related tools.

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?

The description explicitly tells when to use this tool versus alternatives: 'Use `get_pr_diff` first if you need to confirm line numbers are present in the diff. For general PR comments, use `add_pr_comment`.' This is direct and actionable.

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/jacobpixleratgather/bitbucket-mcp'

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