Skip to main content
Glama

get_post

Retrieve a specific post from a Band group by providing the band identifier and post identifier. This tool accesses Band API data to fetch individual posts for viewing or processing.

Instructions

Get a single post from BAND.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
band_keyYesband identifier
post_keyYespost identifier

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
result_codeYesResult code
result_dataYesResult data

Implementation Reference

  • The core handler function for the 'get_post' tool. It takes band_key and post_key, fetches the post data from the BAND API using bandApiClient, and returns the result as a JSON-formatted text content block.
    export async function handleToolCall(band_key: string, post_key: string) {
        const postData = await bandApiClient.get<PostResponse>(
            '/v2/band/post', 
            { band_key, post_key }
        );
        return {
            content: [{
                type: "text",
                text: JSON.stringify(postData, null, 2)
            }]
        };
    }
  • The ToolDefinition export defining the 'get_post' tool's name, description, input schema (band_key and post_key required), and comprehensive output schema matching the BAND API response structure.
    export const ToolDefinition : Tool = {
        name: "get_post",
        description: "Get a single post from BAND.",
        inputSchema: {
            type: "object",
            properties: {
                band_key: {
                    type: "string",
                    title: "Band Key",
                    description: "band identifier"
                },
                post_key: {
                    type: "string",
                    title: "Post Key",
                    description: "post identifier"
                }
            },
            required: ["band_key", "post_key"]
        },
        outputSchema: {
            type: "object",
            properties: {
                result_code: {
                    type: "number",
                    description: "Result code"
                },
                result_data: {
                    type: "object",
                    description: "Result data",
                    properties: {
                        content: {
                            type: "string",
                            description: "post content"
                        },
                        post_key: {
                            type: "string",
                            description: "post identifier"
                        },
                        created_at: {
                            type: "number",
                            description: "created time"
                        },
                        photos: {
                            type: "array",
                            description: "post photos",
                            items: {
                                type: "object",
                                properties: {
                                    width: {
                                        type: "number",
                                        description: "photo width"
                                    },
                                    height: {
                                        type: "number",
                                        description: "photo height"
                                    },
                                    photo_key: {
                                        type: "string",
                                        description: "photo identifier"
                                    },
                                    photo_album_key: {
                                        type: ["string", "null"],
                                        description: "photo album identifier"
                                    },
                                    author: {
                                        type: "object",
                                        description: "photo author",
                                        properties: {
                                            name: {
                                                type: "string",
                                                description: "author name"
                                            },
                                            description: {
                                                type: "string",
                                                description: "author description"
                                            },
                                            profile_image_url: {
                                                type: "string",
                                                description: "author profile image url"
                                            }
                                        }
                                    },
                                    url: {
                                        type: "string",
                                        description: "photo url"
                                    },
                                    comment_count: {
                                        type: "number",
                                        description: "photo comment count"
                                    },
                                    emotion_count: {
                                        type: "number",
                                        description: "photo emotion count"
                                    },
                                    created_at: {
                                        type: "number",
                                        description: "photo created time"
                                    },
                                    is_video_thumbnail: {
                                        type: "boolean",
                                        description: "is video thumbnail"
                                    }
                                }
                            }
                        },
                        comment_count: {
                            type: "number",
                            description: "post comment count"
                        },
                        author: {
                            type: "object",
                            description: "post author",
                            properties: {
                                name: {
                                    type: "string",
                                    description: "author name"
                                },
                                description: {
                                    type: "string",
                                    description: "author description"
                                },
                                profile_image_url: {
                                    type: "string",
                                    description: "author profile image url"
                                }
                            }
                        }
                    }
                }
            },
            required: ["result_code", "result_data"]
        }
    };
  • src/tools.ts:15-28 (registration)
    Registration of the 'get_post' tool (as post.ToolDefinition) in the central bandTools array exported for MCP tool listing.
    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:46-47 (registration)
    Routing logic in the main handleToolCall function that dispatches 'get_post' calls to the specific post.handleToolCall with parsed arguments.
    case "get_post":
      return post.handleToolCall(a.band_key as string, a.post_key as string);
  • Index file re-exporting ToolDefinition and handleToolCall from tool.ts for convenient import in src/tools.ts.
    import {ToolDefinition, handleToolCall} from "./tool.js";
    
    const post = {ToolDefinition, handleToolCall}
    
    export default post;
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It implies a read operation ('Get') but doesn't specify if it's safe, requires authentication, has rate limits, or what happens on errors. This leaves significant gaps in understanding the tool's behavior beyond the basic action.

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, direct sentence: 'Get a single post from BAND.' It is front-loaded with the core action and resource, with no unnecessary words or fluff, making it highly efficient and easy to parse.

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 simplicity (2 parameters, 100% schema coverage, output schema provided), the description is minimally adequate. However, it lacks context on authentication, error handling, or how it fits with sibling tools, which could help an agent use it more effectively in a broader workflow.

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?

The schema description coverage is 100%, with clear documentation for both parameters ('band_key' and 'post_key'). The description doesn't add any meaning beyond what the schema provides, such as format examples or usage tips, but the schema adequately covers the parameters, meeting the baseline for high coverage.

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

Purpose3/5

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

The description states the tool's purpose as 'Get a single post from BAND,' which clearly indicates a read operation on a specific resource. However, it lacks differentiation from sibling tools like 'get_posts' (plural) and doesn't specify what distinguishes retrieving one post versus multiple posts, making it somewhat vague in context.

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, such as needing a band and post key, or compare it to similar tools like 'get_posts' for multiple posts or 'get_comments' for related content, leaving the agent without usage context.

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