get_photos
Retrieve photos from a specific album in BAND using the album identifier and band key. This tool enables users to access and view photo collections stored within their BAND groups.
Instructions
Get photos from a specific album in BAND.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| band_key | Yes | band identifier | |
| photo_album_key | No | photo album identifier |
Implementation Reference
- src/photos/tool.ts:106-126 (handler)The main handler function for the 'get_photos' tool. It constructs parameters from inputs, calls the BAND API endpoint '/v2/band/album/photos', and returns the JSON-stringified response.export async function handleToolCall( band_key: string, photo_album_key?: string ) { const params: Record<string, unknown> = { band_key }; if (photo_album_key) (params as Record<string, unknown>).photo_album_key = photo_album_key; const photosData = await bandApiClient.get<PhotosResponse>( "/v2/band/album/photos", params ); return { content: [ { type: "text", text: JSON.stringify(photosData, null, 2), }, ], }; }
- src/photos/tool.ts:8-94 (schema)The ToolDefinition export containing inputSchema (requiring band_key, optional photo_album_key) and detailed outputSchema for the get_photos tool.export const ToolDefinition: Tool = { name: "get_photos", description: "Get photos from a specific album in BAND.", inputSchema: { type: "object", properties: { band_key: { type: "string", title: "Band Key", description: "band identifier", }, photo_album_key: { type: "string", title: "Photo Album Key", description: "photo album identifier", }, }, required: ["band_key"], }, outputSchema: { type: "object", properties: { result_code: { type: "number", description: "Result code", }, result_data: { type: "object", description: "Result data", properties: { paging: { type: "object", description: "Paging information", }, items: { type: "array", description: "List of photos", items: { type: "object", properties: { photo_key: { type: "string", description: "photo identifier", }, url: { type: "string", description: "photo url", }, width: { type: "number", description: "photo width", }, height: { type: "number", description: "photo height", }, created_at: { type: "number", description: "photo created time", }, 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", }, }, }, }, }, }, }, }, }, required: ["result_code", "result_data"], }, };
- src/tools.ts:15-28 (registration)The bandTools array registers the ToolDefinition for 'get_photos' (via photos.ToolDefinition at line 23).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:62-66 (registration)Central switch-case registration in handleToolCall function that routes 'get_photos' calls to the photos module's handleToolCall.case "get_photos": return photos.handleToolCall( a.band_key as string, a.photo_album_key as string | undefined );