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";
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