Skip to main content
Glama

get_user_information

Retrieve user profile information from BAND, including the option to fetch user details within a specific band context by providing a band key.

Instructions

Get user profile information from BAND. Optionally specify a band_key to get user info within a specific band context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
band_keyNoBand ID to get the user's profile from a specific band. If not provided, the default profile of the user will be returned.

Implementation Reference

  • The core handler function that executes the get_user_information tool by calling the BAND API /v2/profile endpoint and formatting the response.
    export async function handleToolCall(band_key?: string) { const params: Record<string, unknown> = {}; if (band_key) (params as Record<string, unknown>).band_key = band_key; const profile = await bandApiClient.get<BandUserProfile>( "/v2/profile", params ); return { content: [ { type: "text", text: JSON.stringify(profile, null, 2), }, ], }; }
  • The ToolDefinition object defining the tool's name, description, input schema (optional band_key), and output schema for get_user_information.
    export const ToolDefinition: Tool = { name: "get_user_information", description: "Get user profile information from BAND. Optionally specify a band_key to get user info within a specific band context.", inputSchema: { type: "object", properties: { band_key: { type: "string", title: "Band Key", description: "Band ID to get the user's profile from a specific band. If not provided, the default profile of the user will be returned.", }, }, required: [], }, outputSchema: { type: "object", properties: { success: { type: "boolean", description: "Indicates if the operation was successful.", }, data: { type: "object", description: "User profile data returned from BAND API.", properties: { user_key: { type: "string", description: "User ID.", }, name: { type: "string", description: "User's name.", }, profile_image_url: { type: "string", description: "URL of a profile image.", }, is_app_member: { type: "boolean", description: "Boolean value indicating whether the user account is connected to your app or not.", }, message_allowed: { type: "boolean", description: "Boolean value indicating whether the user allowed to receive messages or not.", }, }, }, }, required: ["success", "data"], }, };
  • src/tools.ts:15-28 (registration)
    Registration of all tools including get_user_information via profile.ToolDefinition in the bandTools export 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:34-36 (registration)
    Routing logic in the main handleToolCall switch statement that dispatches get_user_information calls to the profile module's handler.
    case "get_user_information": return profile.handleToolCall(a.band_key as string | undefined); case "get_bands":
  • TypeScript interface defining the expected shape of the BAND user profile response.
    interface BandUserProfile { name: string; profile_image_url?: string; is_app_member: boolean; message_allowed: boolean; }

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