Skip to main content
Glama

get_bands

Retrieve the list of BAND groups you have joined to access and manage your community memberships.

Instructions

Get the list of bands that the user joined from BAND.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the tool by calling the BAND API endpoint '/v2/bands' and returning the JSON stringified response.
    export async function handleToolCall() { const bandsData = await bandApiClient.get<BandsResponse>('/v2/bands'); return { content: [{ type: "text", text: JSON.stringify(bandsData, null, 2) }] }; }
  • Defines the tool metadata including name, description, empty input schema, and detailed output schema matching the BAND API response structure.
    export const ToolDefinition : Tool = { name: "get_bands", description: "Get the list of bands that the user joined from BAND.", inputSchema: { type: "object", properties: {}, required: [] }, outputSchema: { type: "object", properties: { success: { type: "boolean", description: "Indicates if the operation was successful." }, data: { type: "object", description: "User's bands data returned from BAND API.", properties: { bands: { type: "array", description: "List of bands the user joined.", items: { type: "object", properties: { band_key: { type: "string", description: "Band ID." }, name: { type: "string", description: "Band name." }, description: { type: "string", description: "Band description." }, cover_url: { type: "string", description: "URL of a cover image." }, band_url: { type: "string", description: "URL of a band." }, member_count: { type: "number", description: "Number of band members." }, created_at: { type: "number", description: "Band creation time in timestamp format." } } } } } } }, required: ["success", "data"] } };
  • src/tools.ts:36-37 (registration)
    Registers the handler dispatch in the main tool switch statement, calling bands.handleToolCall() for 'get_bands'.
    case "get_bands": return bands.handleToolCall();
  • src/tools.ts:15-28 (registration)
    Registers the get_bands ToolDefinition (from bands.ToolDefinition) into the array of all 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, ];
  • src/bands/index.ts:1-5 (registration)
    Re-exports the ToolDefinition and handleToolCall from tool.ts for use in src/tools.ts.
    import {ToolDefinition, handleToolCall} from "./tool.js"; const bands = {ToolDefinition, handleToolCall} export default bands;

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