Skip to main content
Glama

write_post

Create and publish content to BAND groups using the Band API. Specify the target group, post content, and optional push notification settings.

Instructions

Write a post to BAND.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
band_keyYesband identifier
contentYespost content
do_pushNowhether to send push notification

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
result_codeYesResult code
result_dataYesResult data

Implementation Reference

  • The main handler function for the 'write_post' tool that performs the API call to create a post on BAND.
    export async function handleToolCall(
      band_key: string,
      content: string,
      do_push?: boolean
    ) {
      const params: Record<string, unknown> = { band_key, content };
      if (do_push !== undefined)
        (params as Record<string, unknown>).do_push = do_push;
      const postData = await bandApiClient.post<WritePostResponse>(
        "/v2.2/band/post/create",
        params
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(postData, null, 2),
          },
        ],
      };
    }
  • The ToolDefinition including inputSchema and outputSchema for the 'write_post' tool.
    export const ToolDefinition: Tool = {
      name: "write_post",
      description: "Write a post to BAND.",
      inputSchema: {
        type: "object",
        properties: {
          band_key: {
            type: "string",
            title: "Band Key",
            description: "band identifier",
          },
          content: {
            type: "string",
            title: "Content",
            description: "post content",
          },
          do_push: {
            type: "boolean",
            title: "Do Push",
            description: "whether to send push notification",
          },
        },
        required: ["band_key", "content"],
      },
      outputSchema: {
        type: "object",
        properties: {
          result_code: {
            type: "number",
            description: "Result code",
          },
          result_data: {
            type: "object",
            description: "Result data",
            properties: {
              post_key: {
                type: "string",
                description: "created post identifier",
              },
            },
          },
        },
        required: ["result_code", "result_data"],
      },
    };
  • src/tools.ts:15-28 (registration)
    Registration of the 'write_post' ToolDefinition (line 25) in the main bandTools array.
    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,
    ];
  • src/tools.ts:73-78 (registration)
    Dispatch case in the main handleToolCall function that routes 'write_post' calls to the specific handler.
    case "write_post":
      return writePost.handleToolCall(
        a.band_key as string,
        a.content as string,
        a.do_push as boolean | undefined
      );
  • Index file that bundles and exports ToolDefinition and handleToolCall for writePost.
    import {ToolDefinition, handleToolCall} from "./tool.js";
    
    const writePost = {ToolDefinition, handleToolCall}
    
    export default writePost;
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'Write a post,' implying a mutation that creates content, but lacks critical behavioral details: it doesn't specify required permissions, whether the post is public/private, if there are rate limits, what happens on success/failure, or if it's idempotent. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 with zero waste. It's front-loaded with the core action and resource, making it immediately scannable. Every word earns its place by conveying the essential purpose without redundancy or fluff.

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 the tool's complexity (a mutation with 3 parameters), lack of annotations, and presence of an output schema, the description is minimally adequate but incomplete. It states what the tool does but misses behavioral context (e.g., permissions, effects) and usage guidelines. The output schema may cover return values, but the description doesn't compensate for other gaps, making it just viable.

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%, with clear descriptions for band_key, content, and do_push. The description adds no additional meaning beyond the schema—it doesn't explain parameter interactions, formatting requirements (e.g., content length), or default behaviors (e.g., do_push default). Baseline 3 is appropriate as the schema does the heavy lifting, but no extra value is provided.

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') and resource ('a post to BAND'), making the purpose immediately understandable. It distinguishes this as a write operation among sibling tools that are mostly read operations (get_*) or other mutations (remove_*, write_comment). However, it doesn't specify what 'BAND' is (a platform/service) or the exact nature of the post, keeping it from 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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a band_key), differentiate from write_comment (which might be for commenting on posts), or indicate scenarios where this is appropriate (e.g., creating new posts vs. updating existing ones). Usage is implied but not explicitly stated.

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