Skip to main content
Glama

ado_git_create_pr_comment

Post comments on Azure DevOps pull requests: create threads, reply, or add inline code comments with optional line numbers.

Instructions

Add a comment to a pull request. To reply to an existing thread, provide threadId (do not provide filePath). To create a new general thread, provide only content. To create an inline code comment, provide filePath; optionally add lineNumber (start) and endLineNumber (end) for a multi-line range, and side ('right' for new file, 'left' for old). Requires vso.code_write PAT scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideNoDiff side for the inline comment: 'right' (new file, default) or 'left' (old file). Only used with filePath.right
contentYesComment text (supports markdown)
projectYesProject containing the PR
filePathNoFile path for an inline comment (e.g. '/src/index.ts'). Only for new threads; mutually exclusive with threadId.
threadIdNoThread ID to reply to. Mutually exclusive with filePath.
lineNumberNoStart line number for the inline comment range. Requires filePath.
repositoryIdYesRepository ID or name
endLineNumberNoEnd line number for a multi-line inline comment. Defaults to lineNumber when omitted. Requires filePath.
pullRequestIdYesPull request ID

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.2.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations indicate readOnlyHint=false and openWorldHint=true, so the agent already knows this is a write action with potential side effects. The description adds the specific authorization requirement (vso.code_write PAT scope) and clarifies behavioral constraints (mutual exclusion of threadId and filePath, lineNumber defaults, side values). No contradiction. It stops short of describing the return value, but given no output schema that is acceptable.

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?

The description is compact but information-dense, with each clause serving a purpose: purpose, mode distinctions, parameter relationships, and scope requirement. It is structured as a series of clear conditional statements. Slightly long, but every sentence earns its place given the tool's complexity.

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 tool with 9 parameters and three distinct modes, the description fully explains how to compose parameters, defaults (endLineNumber defaults to lineNumber), and boundary conditions (threadId vs filePath mutual exclusivity). It also notes the required authorization scope. With no output schema, the description covers all necessary operational guidance; nothing critical is missing.

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

Parameters5/5

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

Even though schema coverage is 100%, the description goes beyond individual parameter schemas to explain inter-parameter dependencies and conditional rules: 'provide threadId (do not provide filePath)', 'lineNumber (start) and endLineNumber (end) for a multi-line range', 'side (‘right’ for new file, ‘left’ for old)'. This contextual nuance is essential for correct invocation and is not present in 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 opens with a specific verb and resource: 'Add a comment to a pull request.' It then clearly differentiates three distinct usage modes (reply to thread, new general thread, inline code comment), making the tool's purpose unambiguous and distinct from siblings like ado_git_get_pr_threads which only reads.

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 gives explicit when-to-use instructions for each mode: 'To reply to an existing thread, provide threadId (do not provide filePath). To create a new general thread, provide only content. To create an inline code comment, provide filePath...' It also states the required PAT scope. This is direct, actionable guidance with no ambiguity.

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

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/Laonnda/azure-devops-local-mcp'

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