Skip to main content
Glama

add_comment

Post a new comment on any target in a workspace: a row, a cell, a doc text range, an html element, an entire surface, or the workspace itself. Polymorphic target shape mirrors the REST POST /api/workspaces/:slug/comments. For threading, pass parentId to hang the new comment as a reply (the server flattens nested replies to single depth and auto-unresolves a resolved parent). Mentions are an array of { kind: 'user'|'agent', id, label } triples; the server validates each mention's access to the workspace before accepting. Fires comment.added (and comment.unresolved when a reply reopens a resolved parent). For replies to existing comments where you don't want to reconstruct the target, prefer reply_to_comment which derives the target from the parent. Editor or commenter role required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesComment body (plain text or markdown). 1-5000 chars.
slugYesThe workspace slug ('my-workspace' or 'my-org/my-workspace').
targetYesPolymorphic target. Shapes: { type: 'row', rowId: '<cuid>' } { type: 'cell', rowId: '<cuid>', columnKey: '<key>' } { type: 'doc_range', surfaceSlug: '<slug>', anchor: { from: <number>, to: <number>, text: '<plain>' } } { type: 'html_element', surfaceSlug: '<slug>', anchor: { selector: '<css>', text?: '<plain>' } } { type: 'video_frame', surfaceSlug: '<slug>', anchor: { videoId: '<id from list_videos>', t: <seconds>, box?: { x, y, w, h } } } (box in fractions of the frame, 0-1 from the top-left) { type: 'surface', surfaceSlug: '<slug>' } { type: 'workspace' }
mentionsNoOptional `[{ kind, id, label }]` mentions. Each mention's principal must have workspace access. Fires inbox + email + webhook fan-out for newly-mentioned recipients only.
parentIdNoOptional parent comment id. When passed, this comment becomes a reply in the thread. Nested replies flatten to single-depth (reply-to-reply re-points at the root). Re-opens a resolved parent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / target / description
      Previous value: -"Polymorphic target. Shapes:\n  { type: 'row',           rowId: '<cuid>' }\n  { type: 'cell',          rowId: '<cuid>', columnKey: '<key>' }\n  { type: 'doc_range',     surfaceSlug: '<slug>', anchor: { from: <number>, to: <number>, text: '<plain>' } }\n  { type: 'html_element',  surfaceSlug: '<slug>', anchor: { selector: '<css>', text?: '<plain>' } }\n  { type: 'surface',       surfaceSlug: '<slug>' }\n  { type: 'workspace' }"New value: +"Polymorphic target. Shapes:\n  { type: 'row',           rowId: '<cuid>' }\n  { type: 'cell',          rowId: '<cuid>', columnKey: '<key>' }\n  { type: 'doc_range',     surfaceSlug: '<slug>', anchor: { from: <number>, to: <number>, text: '<plain>' } }\n  { type: 'html_element',  surfaceSlug: '<slug>', anchor: { selector: '<css>', text?: '<plain>' } }\n  { type: 'video_frame',   surfaceSlug: '<slug>', anchor: { videoId: '<id from list_videos>', t: <seconds>, box?: { x, y, w, h } } }  (box in fractions of the frame, 0-1 from the top-left)\n  { type: 'surface',       surfaceSlug: '<slug>' }\n  { type: 'workspace' }"
  2. Added
  3. Removed
  4. Added

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so richly: server flattens nested replies to single depth, auto-unresolves a resolved parent, validates each mention's workspace access, and fires `comment.added` / `comment.unresolved` events. These are non-obvious side effects an agent could not infer from the schema.

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?

Purpose is front-loaded in sentence one; each subsequent sentence adds distinct operational information (threading, mentions, events, alternative tool, permission). No filler or restatement of the name.

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 complex, polymorphic, nested-target mutation tool with no annotations and no output schema, the description covers the target model, threading semantics, mention validation, emitted events, and role requirements. Nothing needed 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 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it explains that parentId triggers flattening and parent-reopening, and that mentions are access-validated with inbox/email/webhook fan-out to newly-mentioned recipients only. It does not restate the target shapes, correctly leaving those to 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?

Opens with a specific verb+resource ('Post a new comment') and immediately enumerates the exact target kinds it supports (row, cell, doc text range, html element, surface, workspace). It explicitly distinguishes itself from the sibling reply_to_comment, so an agent can route without opening either schema.

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?

States both when to use it and when to prefer the alternative: 'For replies to existing comments where you don't want to reconstruct the target, prefer reply_to_comment which derives the target from the parent.' It also gives the prerequisite ('Editor or commenter role required'), covering the main gating condition.

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.