permissions
Retrieve post permission details from BAND groups to check write permissions for posting, commenting, and content deletion operations.
Instructions
Get post permission information from BAND.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"band_key": "<band_key>",
"permissions": "<permissions>"
},
"name": "permissions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| band_key | Yes | Band ID | |
| permissions | Yes | Comma-separated permission types: posting (Post write permission), commenting (Comment write permission), contents_deletion (Post/Comment delete permission) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result_code | Yes | Result code | |
| result_data | Yes | Result data |
Implementation Reference
- src/permissions/tool.ts:66-77 (handler)The main handler function that executes the 'permissions' tool by calling the Band API to get permission information.
export async function handleToolCall(band_key: string, permissions: string) { const permissionData = await bandApiClient.get<PostPermissionResponse>( '/v2/band/permissions', { band_key, permissions } ); return { content: [{ type: "text", text: JSON.stringify(permissionData, null, 2) }] }; } - src/permissions/tool.ts:8-55 (schema)The ToolDefinition including name, description, inputSchema, and outputSchema for the 'permissions' tool.
export const ToolDefinition : Tool = { name: "permissions", description: "Get post permission information from BAND.", inputSchema: { type: "object", properties: { band_key: { type: "string", title: "Band ID", description: "Band ID" }, permissions: { type: "string", title: "Permissions", description: "Comma-separated permission types: posting (Post write permission), commenting (Comment write permission), contents_deletion (Post/Comment delete permission)" } }, required: ["band_key", "permissions"] }, outputSchema: { type: "object", properties: { result_code: { type: "number", description: "Result code" }, result_data: { type: "object", description: "Result data", properties: { create_post: { type: "boolean", description: "permission to create post" }, create_comment: { type: "boolean", description: "permission to create comment" }, invite_member: { type: "boolean", description: "permission to invite member" } } } }, required: ["result_code", "result_data"] } }; - src/tools.ts:15-28 (registration)Registration of the 'permissions' ToolDefinition in the central 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:55-59 (registration)Handler dispatch registration for the 'permissions' tool in the central handleToolCall switch statement.
case "permissions": return permissions.handleToolCall( a.band_key as string, a.permissions as string );