Skip to main content
Glama
TaylorChen

Multi-MCPs

by TaylorChen

search_photos

Find and retrieve photos from Unsplash by entering search terms, enabling visual content discovery for projects and presentations.

Instructions

Search Unsplash photos

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
per_pageNo

Implementation Reference

  • The handler function that executes the search_photos tool logic, validating inputs and calling the Unsplash client.
    async search_photos(args: Record<string, unknown>) {
      if (!cfg.unsplashAccessKey) throw new Error("UNSPLASH_ACCESS_KEY is not configured");
      const query = String(args.query || "");
      if (!query) throw new Error("query is required");
      const perPage = args.per_page ? Number(args.per_page) : undefined;
      return client.searchPhotos(query, perPage);
    },
  • Input schema for the search_photos tool, defining query as required string and optional per_page number.
    inputSchema: {
      type: "object",
      properties: { query: { type: "string" }, per_page: { type: "number" } },
      required: ["query"],
    },
  • Tool registration definition for search_photos within the Unsplash module's ToolRegistration.
    {
      name: "search_photos",
      description: "Search Unsplash photos",
      inputSchema: {
        type: "object",
        properties: { query: { type: "string" }, per_page: { type: "number" } },
        required: ["query"],
      },
    },
  • UnsplashClient.searchPhotos method, the core API call implementation for searching photos.
    searchPhotos(query: string, perPage?: number) {
      return this.request("/search/photos", { headers: this.headers(), query: { query, per_page: perPage ?? 10 } });
    }
  • Main registration invocation including the Unsplash tools (containing search_photos) in the aggregator.
    registerUnsplash(),

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/TaylorChen/muti-mcps'

If you have feedback or need assistance with the MCP directory API, please join our Discord server