Skip to main content
Glama

write_comment

Add comments to BAND posts using band and post identifiers with specified content to engage with group discussions.

Instructions

Write a comment to BAND post.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
band_keyYesband identifier
bodyYescomment content
post_keyYespost identifier

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
result_codeYesResult code
result_dataYesResult data

Implementation Reference

  • The main handler function that executes the write_comment tool by calling the BAND API to create a comment and returning the formatted response.
    export async function handleToolCall(band_key: string, post_key: string, body: string) {
        const commentData = await bandApiClient.post<WriteCommentResponse>(
            '/v2/band/post/comment/create',
            { band_key, post_key, body }
        );
        return {
            content: [{
                type: "text",
                text: JSON.stringify(commentData, null, 2)
            }]
        };
    }
  • Defines the ToolDefinition including inputSchema (band_key, post_key, body) and outputSchema (result_code, result_data with comment_key) for the write_comment tool.
    export const ToolDefinition : Tool = {
        name: "write_comment",
        description: "Write a comment to BAND post.",
        inputSchema: {
            type: "object",
            properties: {
                band_key: {
                    type: "string",
                    title: "Band Key",
                    description: "band identifier"
                },
                post_key: {
                    type: "string",
                    title: "Post Key",
                    description: "post identifier"
                },
                body: {
                    type: "string",
                    title: "Body",
                    description: "comment content"
                }
            },
            required: ["band_key", "post_key", "body"]
        },
        outputSchema: {
            type: "object",
            properties: {
                result_code: {
                    type: "number",
                    description: "Result code"
                },
                result_data: {
                    type: "object",
                    description: "Result data",
                    properties: {
                        comment_key: {
                            type: "string",
                            description: "created comment identifier"
                        }
                    }
                }
            },
            required: ["result_code", "result_data"]
        }
    };
  • src/tools.ts:67-72 (registration)
    Registers the dispatching of 'write_comment' tool calls to the specific handleToolCall function in the main tools handler.
    case "write_comment":
      return writeComment.handleToolCall(
        a.band_key as string,
        a.post_key as string,
        a.body as string
      );
  • src/tools.ts:15-28 (registration)
    Registers the ToolDefinition of write_comment in the array of available BAND tools.
    export const bandTools: Tool[] = [
      profile.ToolDefinition,
      bands.ToolDefinition,
      posts.ToolDefinition,
      post.ToolDefinition,
      comments.ToolDefinition,
      permissions.ToolDefinition,
      albums.ToolDefinition,
      photos.ToolDefinition,
      writeComment.ToolDefinition,
      writePost.ToolDefinition,
      removePost.ToolDefinition,
      removeComment.ToolDefinition,
    ];
  • Helper module that re-exports ToolDefinition and handleToolCall from tool.ts for easy import in the main tools file.
    import {ToolDefinition, handleToolCall} from "./tool.js";
    
    const writeComment = {ToolDefinition, handleToolCall}
    
    export default writeComment;
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a write operation ('Write a comment') but doesn't mention permission requirements, whether comments are editable/deletable, rate limits, or what happens on success/failure. This leaves significant behavioral gaps for a mutation tool.

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 a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a straightforward tool and front-loads the essential information.

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

Completeness3/5

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

Given that there's an output schema (which handles return values) and 100% schema coverage for parameters, the description covers the basic purpose adequately. However, for a mutation tool with no annotations, it should provide more behavioral context about permissions, side effects, or error conditions to be truly complete.

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?

Schema description coverage is 100%, so the schema already documents all three parameters adequately. The description doesn't add any additional parameter context beyond what's in the schema, such as format examples or constraints, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Write a comment') and target resource ('to BAND post'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'write_post' or explain how commenting differs from creating a post, which prevents a perfect score.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus alternatives like 'write_post' or 'remove_comment'. The description doesn't mention prerequisites, appropriate contexts, or exclusions, leaving the agent without usage direction.

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/kanghouchao/band-mcp-server'

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