Skip to main content
Glama

get_logo_url

Retrieve a customizable logo image URL for any company domain, with options for size, format, theme, and greyscale conversion.

Instructions

Get a direct logo image URL for a specific domain. Supports customization options like size, format, theme, and more.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesThe company domain (e.g., 'google.com', 'apple.com')
sizeNoLogo size/dimensions (optional)
formatNoImage format (default: png)
themeNoLogo theme variant (optional)
greyscaleNoConvert logo to greyscale (default: false)

Implementation Reference

  • Handler function that constructs a parameterized logo URL using the logo.dev image base and returns a JSON response with the URL and options summary. Handles errors gracefully.
    async ({ domain, size, format, theme, greyscale }) => {
      try {
        const params = new URLSearchParams({
          token: config.apiKey,
        });
    
        if (size) params.append("size", size);
        if (format) params.append("format", format);
        if (theme) params.append("theme", theme);
        if (greyscale) params.append("greyscale", "true");
    
        const logoUrl = `${LOGO_DEV_IMG_BASE}/${domain}?${params.toString()}`;
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(
                {
                  domain,
                  logoUrl,
                  options: {
                    size: size || "default",
                    format: format || "png",
                    theme: theme || "default",
                    greyscale: greyscale || false,
                  },
                },
                null,
                2
              ),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text" as const,
              text: `Error generating logo URL: ${error instanceof Error ? error.message : String(error)}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Input schema using Zod for validating parameters: required domain and optional size, format, theme, greyscale.
    {
      domain: z.string().describe("The company domain (e.g., 'google.com', 'apple.com')"),
      size: z.string().optional().describe("Logo size/dimensions (optional)"),
      format: z.enum(["png", "jpg", "webp"]).optional().describe("Image format (default: png)"),
      theme: z.enum(["light", "dark"]).optional().describe("Logo theme variant (optional)"),
      greyscale: z.boolean().optional().describe("Convert logo to greyscale (default: false)"),
    },
  • src/index.ts:102-104 (registration)
    Registers the 'get_logo_url' tool on the MCP server with its name, description, input schema, and handler function.
    server.tool(
      "get_logo_url",
      "Get a direct logo image URL for a specific domain. Supports customization options like size, format, theme, and more.",
  • Constant URL base for logo.dev images, used in the get_logo_url handler to construct image URLs.
    const LOGO_DEV_IMG_BASE = "https://img.logo.dev";
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 states the tool 'Get[s] a direct logo image URL' and supports 'customization options,' but lacks critical details: it doesn't specify if this is a read-only operation, potential rate limits, authentication requirements, error handling (e.g., for invalid domains), or what happens if no logo is found. For a tool with no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two sentences: the first states the core purpose, and the second highlights customization support. It's front-loaded with the main function, and there's no redundant or verbose language. However, it could be slightly more structured by explicitly listing key parameters or use cases, preventing a perfect score.

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

Completeness2/5

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

Given the tool's moderate complexity (5 parameters, no output schema, no annotations), the description is incomplete. It lacks details on behavioral traits (e.g., read-only nature, error scenarios), output format (e.g., URL structure, potential null responses), and usage context compared to 'search_logos.' Without annotations or an output schema, the description should provide more comprehensive guidance to aid the agent effectively.

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 description adds minimal value beyond the input schema, which has 100% coverage. It mentions 'customization options like size, format, theme, and more,' but this merely echoes the schema's parameter names without providing additional context (e.g., typical size values, when to use themes). With high schema coverage, the baseline is 3, as the description doesn't compensate with extra semantic insights.

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 tool's purpose: 'Get a direct logo image URL for a specific domain.' It specifies the verb ('Get'), resource ('logo image URL'), and target ('specific domain'), making the function unambiguous. However, it doesn't explicitly differentiate from the sibling tool 'search_logos' (e.g., by noting this retrieves a single logo vs. searching multiple), which prevents 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. It mentions 'Supports customization options' but doesn't clarify scenarios where this tool is preferred over 'search_logos' or other potential tools. There's no mention of prerequisites, limitations, or typical use cases, leaving the agent with insufficient context for decision-making.

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