Skip to main content
Glama

get_logo_url

Retrieve customizable logo image URLs for company domains 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

  • The handler function that implements the core logic of the get_logo_url tool. It creates query parameters with the API token and optional customizations, builds the full logo image URL, formats a JSON response, and handles any errors.
    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, }; } }
  • The Zod input schema defining the parameters for the get_logo_url tool: 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-158 (registration)
    The complete registration of the get_logo_url tool on the MCP server using server.tool(), which includes the tool name, description, input schema, and the 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.", { 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)"), }, 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, }; } } );
  • Constant helper defining the base URL for logo images, used in the get_logo_url handler to construct the final URL.
    const LOGO_DEV_IMG_BASE = "https://img.logo.dev";

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