Skip to main content
Glama

Add Comment

add_comment

Post a plain-text comment (up to 2,000 characters) or a one-level reply (parent_id) on one of YOUR documents, or on a private document shared with you. It is posted under the signed-in user's name and clearly labelled "Agent, unverified" — you cannot set or change the author or label. If the person later edits it, it becomes their own comment. You cannot comment on other people's public documents. To comment on a passage of a Markdown document, pass anchor with the exact quote (and optionally a prefix or suffix to tell repeated text apart): if the quote appears more than once nothing is posted and you get up to 5 places to choose from, and if it is not found the call fails with quote_not_found. Pass an idempotency_key (any string up to 128 characters) so a retry returns the original comment instead of posting a duplicate. Comments go through the same content screening as human comments and are rate limited per connection and per document. The user and the document owner can delete any comment you post. Passages of HTML documents work the same way: the quote is matched against the text a reader sees on the page, not the HTML source.

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": {
      "slug": "<slug>",
      "body": "<body>"
    },
    "name": "add_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesPlain text, up to 2000 characters. No HTML or Markdown is rendered.
slugYesThe document slug (e.g. "abc12345" from the document URL)
anchorNoAttach the comment to a passage of a Markdown document instead of the whole document. If the quote appears more than once nothing is posted and you get up to 5 places to choose from; if it is not found, the call fails with quote_not_found. Cannot be combined with parent_id.
parent_idNoReply to this top-level comment (replies are one level deep)
idempotency_keyNoAny unique string. Retrying with the same key returns the original comment instead of posting a duplicate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context the annotations cannot convey: the comment is posted under the signed-in user's name with an immutable "Agent, unverified" label, authorship transfers on human edit, content is screened, calls are rate limited per connection and per document, and the user or document owner can delete it. It also discloses failure modes (nothing posted on ambiguous quotes, up to 5 candidates returned, quote_not_found) — exactly the behavioral detail an agent needs before mutating state.

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?

Front-loaded with the core action and scope, then proceeds through constraints, anchoring, idempotency, and moderation in a logical order with no filler sentences. It is a single dense block that would scan better as short clauses or bullets, but every sentence carries 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?

For a 5-parameter write tool with a nested `anchor` object and no output schema, the description covers invocation modes, mutual exclusions, error outcomes, attribution, and rate limits. Nothing an agent needs in order to call 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 already 100%, so the baseline is 3; the description earns above that by explaining *why* `prefix`/`suffix` exist (disambiguating repeated text) and what happens when they are omitted, plus the retry semantics of `idempotency_key`. The 2,000-character body limit is repeated from the schema rather than adding value.

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 specific verb and resource ("Post a plain-text comment ... or a one-level reply") and immediately bounds it by ownership scope ("on one of YOUR documents, or on a private document shared with you"). This differentiates it cleanly from delete_comment and list_comments without needing to name them.

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 explicit when-not guidance ("You cannot comment on other people's public documents") and disambiguates the two modes of commenting: whole-document vs. passage via `anchor`, with `parent_id` reserved for replies. It stops short of routing the agent to sibling tools for reading or deleting comments, so it falls just below a full 5.

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.