Skip to main content
Glama

Comment on a pull request about threats

comment_threat_on_change

For a completed pipeline scan of a pull request: post, or update, one comment per threat whose linked code the pull request changes. A re-run with nothing changed makes no calls. Returns each comment's status (posted, updated, skipped with the reason, failed). Public repositories are skipped with the reason 'public repository'. Error codes: permission_missing, role_missing, destination_not_found, already_filed, rate_limited, assignee_unmapped, no_route, no_entry, not_found, invalid, no_company, tracker_error, filed_unrecorded, outcome_unknown, not_attempted, not_configured, tracker_unreachable, unsupported. Do not resend filed_unrecorded or outcome_unknown items without checking the tracker; resend not_attempted items to continue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scan_idYesPipeline scan id (uuid)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, openWorldHint=true, but the description adds substantial behavior beyond them: per-threat comment granularity, idempotent re-run semantics, skip reasons, a full error-code vocabulary, and retry guidance for filed_unrecorded/outcome_unknown/not_attempted. This is exactly the mutation-safety context an agent needs.

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?

Purpose and behavior are front-loaded before the error-code and retry guidance. The long enumerated error list is dense but genuinely informative; slightly heavy, yet each sentence carries usable information.

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?

With no output schema, the description correctly explains the return values (each comment's status: posted, updated, skipped with reason, failed) and covers skip behavior and error handling. Complete for a single-parameter tool.

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?

With one required parameter and 100% schema description coverage, the schema already documents scan_id fully. The description frames the scan context ('completed pipeline scan of a pull request') but adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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?

States a precise verb+resource: it posts/updates one comment per threat whose linked code the PR changes, scoped to a completed pipeline scan of a pull request. This is specific enough to distinguish it from siblings like file_threat_tickets or get_threat_tickets without inspecting schemas.

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

Usage Guidelines4/5

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

Gives clear when-to-use context (a completed pipeline scan of a PR), when-nothing-happens (re-run with nothing changed makes no calls), and skip conditions (public repos skipped). It stops short of explicitly naming which sibling to use instead of this one, so it is strong but not fully routing.

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