Skip to main content
Glama

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
NameRequiredDescriptionDefault
band_keyYesband identifier
photo_album_keyNophoto album identifier

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
result_codeYesResult code
result_dataYesResult data

Implementation Reference

  • 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),
          },
        ],
      };
    }
  • 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
      );
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 only states what the tool does ('Get photos') without mentioning any traits like whether it's read-only, requires authentication, has rate limits, returns paginated results, or what the output format is. This leaves significant gaps for an agent to understand the tool's behavior.

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, efficient sentence that directly states the tool's purpose without any wasted words. It is front-loaded and appropriately sized for its simple function, earning a top score for conciseness.

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 that there is an output schema (which covers return values), the description doesn't need to explain outputs. However, with no annotations and a simple purpose, the description is minimally adequate but lacks behavioral context and usage guidelines. It meets the basic requirement but has clear gaps in completeness for effective tool selection.

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 descriptions for both parameters ('band identifier' and 'photo album identifier'). The description adds no additional meaning beyond this, as it doesn't explain parameter relationships or usage nuances. According to the rules, with high schema coverage, the baseline is 3, which is appropriate here.

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

Purpose4/5

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

The description clearly states the verb 'Get' and the resource 'photos from a specific album in BAND', making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_albums' or 'get_posts', which could retrieve related but different resources, so it falls short of a perfect score.

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. For example, it doesn't clarify if this is for retrieving photos from a known album versus using 'get_albums' to find albums first, or how it differs from 'get_posts' which might include photos. Without any usage context or exclusions, the score is low.

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