Skip to main content
Glama

search_logos

Find company logos by searching brand names. Get matching companies with domains and logo URLs for branding, design, or documentation needs.

Instructions

Search for company logos by brand name or company name. Returns a list of matching companies with their domains and logo URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe brand or company name to search for (e.g., 'Google', 'Apple', 'Microsoft')

Implementation Reference

  • Handler function that searches the Logo.dev API for company logos matching the query. It fetches results, formats them with logo URLs using the API key, handles empty results and errors, returning structured JSON content.
    async ({ query }) => {
      try {
        const response = await fetch(
          `${LOGO_DEV_API_BASE}/search?q=${encodeURIComponent(query)}`,
          {
            headers: {
              Authorization: `Bearer ${config.apiKey}`,
            },
          }
        );
    
        if (!response.ok) {
          throw new Error(`Logo.dev API error: ${response.status} ${response.statusText}`);
        }
    
        const data = await response.json();
        const results = Array.isArray(data) ? data : [];
    
        if (results.length === 0) {
          return {
            content: [
              {
                type: "text" as const,
                text: `No logos found for "${query}". Try a different search term.`,
              },
            ],
          };
        }
    
        const formattedResults = results.map((company: any) => ({
          name: company.name || "Unknown",
          domain: company.domain || "Unknown",
          logoUrl: company.domain
            ? `${LOGO_DEV_IMG_BASE}/${company.domain}?token=${config.apiKey}`
            : null,
        }));
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(
                {
                  query,
                  count: formattedResults.length,
                  results: formattedResults,
                },
                null,
                2
              ),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text" as const,
              text: `Error searching logos: ${error instanceof Error ? error.message : String(error)}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Input schema defining the 'query' parameter as a string for the search_logos tool.
    {
      query: z.string().describe("The brand or company name to search for (e.g., 'Google', 'Apple', 'Microsoft')"),
    },
  • src/index.ts:29-100 (registration)
    Registration of the 'search_logos' tool on the MCP server, specifying name, description, input schema, and handler function.
    server.tool(
      "search_logos",
      "Search for company logos by brand name or company name. Returns a list of matching companies with their domains and logo URLs.",
      {
        query: z.string().describe("The brand or company name to search for (e.g., 'Google', 'Apple', 'Microsoft')"),
      },
      async ({ query }) => {
        try {
          const response = await fetch(
            `${LOGO_DEV_API_BASE}/search?q=${encodeURIComponent(query)}`,
            {
              headers: {
                Authorization: `Bearer ${config.apiKey}`,
              },
            }
          );
    
          if (!response.ok) {
            throw new Error(`Logo.dev API error: ${response.status} ${response.statusText}`);
          }
    
          const data = await response.json();
          const results = Array.isArray(data) ? data : [];
    
          if (results.length === 0) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `No logos found for "${query}". Try a different search term.`,
                },
              ],
            };
          }
    
          const formattedResults = results.map((company: any) => ({
            name: company.name || "Unknown",
            domain: company.domain || "Unknown",
            logoUrl: company.domain
              ? `${LOGO_DEV_IMG_BASE}/${company.domain}?token=${config.apiKey}`
              : null,
          }));
    
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(
                  {
                    query,
                    count: formattedResults.length,
                    results: formattedResults,
                  },
                  null,
                  2
                ),
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text" as const,
                text: `Error searching logos: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the action ('search') and output ('returns a list of matching companies with their domains and logo URLs'), but lacks details on rate limits, authentication needs, or error handling. It adds basic context but is not comprehensive.

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 appropriately sized and front-loaded, consisting of two concise sentences that directly state the tool's purpose and output without any wasted words, making it efficient and easy to understand.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is mostly complete, covering purpose and output. However, it could benefit from more behavioral details like search result limits or error cases, but it's adequate for a simple search tool.

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 input schema has 100% description coverage, with the parameter 'query' well-documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline of 3 without adding extra value.

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

Purpose5/5

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

The description clearly states the tool's purpose with specific verbs ('search for company logos') and resources ('by brand name or company name'), and distinguishes it from its sibling 'get_logo_url' by specifying it returns a list of matching companies with domains and logo URLs rather than a single logo URL.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('search for company logos by brand name or company name'), but does not explicitly state when not to use it or mention alternatives like the sibling tool 'get_logo_url', which might be for retrieving a specific logo rather than searching.

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/NOVA-3951/Logodev-MCP'

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