Skip to main content
Glama

Add comment

add_comment

Add a comment to a Scratch sprite or stage to explain code blocks or note ideas. Attach to a specific block for context, or place freely on the canvas.

Instructions

Add a workspace comment to a target. With no blockId the comment floats free on the canvas; pass a blockId (a key in the target's blocks map — see get_target_json) to attach it to that block, which also sets the block's comment back-reference so the editor anchors it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoCanvas X position.
yNoCanvas Y position.
textYesThe comment text.
widthNoBox width in pixels.
heightNoBox height in pixels.
targetYesSprite name, or "Stage".
blockIdNoBlock id to attach to. Omit for a free-floating comment.
minimizedNoWhether the comment is collapsed to its title bar.
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals a key side effect: attaching to a block sets the block's 'comment' back-reference, which impacts the editor anchoring. It also clarifies that omitting blockId results in a free-floating comment. While it doesn't mention permissions or error behavior, it discloses the most important non-obvious side effect.

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?

The description is two sentences long, with the main action front-loaded and the blockId distinction succinctly explained. No fluff or redundancy; every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with 100% schema coverage and no output schema, the description adequately covers the pivotal decision (blockId vs free-floating) and points to get_target_json for block ID discovery. Other parameters like x, y, width, height, and minimized are fully specified in the schema. The description is complete enough for an agent to call the tool correctly.

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%, providing baseline 3. The description adds value beyond the schema by explaining that blockId is a key in the target's blocks map and referencing get_target_json for lookup. It also frames blockId omission as intentional for free-floating comments, enriching the schema's description.

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 clearly states the verb (Add), the resource (workspace comment), and the target. It explicitly distinguishes free-floating vs block-attached comments, and the reference to get_target_json further clarifies where blockId comes from. This fully differentiates it from sibling comment tools like set_comment and remove_comment.

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?

The description explains the two usage modes (with or without blockId) and implies that this is for creating a new comment, while set_comment would modify and remove_comment would delete. It could explicitly name the alternatives, but the verb 'add' and the behavior description make the usage context clear.

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/AstroBlocksMod/ScratchMCP'

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