Skip to main content
Glama

get_best_logo_url

Extract the optimal logo URL from any website by analyzing multiple sources including favicon, OpenGraph, and CSS, with automatic quality scoring for reliable results.

Instructions

从网站提取并返回最佳Logo的URL地址,适用于只需要获取最佳Logo URL的场景

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes要分析的网站URL

Implementation Reference

  • The handler function that implements the core logic for the 'get_best_logo_url' tool. It extracts the logo from the provided URL using LogoExtractor and returns the best logo URL or an error message.
    private async handleGetBestLogoUrl(args: any) {
      const { url } = args;
      
      const analysis = await this.logoExtractor.analyzeLogo(url);
      
      // 统一错误处理方式,与analyze_logo保持一致
      if (analysis.status === 'failed' || !analysis.bestCandidate) {
        return {
          content: [
            {
              type: 'text',
              text: `无法从 ${url} 找到Logo。请检查网站是否存在Logo或网络连接是否正常。`,
            },
          ],
        };
      }
      
      return {
        content: [
          {
            type: 'text',
            text: analysis.bestCandidate.url,
          },
        ],
      };
    }
  • The input schema and tool definition for 'get_best_logo_url' in the ListTools response.
    {
      name: 'get_best_logo_url',
      description: '从网站提取并返回最佳Logo的URL地址,适用于只需要获取最佳Logo URL的场景',
      inputSchema: {
        type: 'object',
        properties: {
          url: {
            type: 'string',
            description: '要分析的网站URL',
          },
        },
        required: ['url'],
      },
    },
  • src/index.ts:93-94 (registration)
    Tool handler dispatch/registration in the CallToolRequestSchema switch statement.
    case 'get_best_logo_url':
      return await this.handleGetBestLogoUrl(args);
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. The description mentions extraction and returning a URL, but doesn't disclose important behavioral traits: what '最佳' (best) means (criteria for selection), whether this makes network requests, potential rate limits, error handling, or what happens if no logo is found. For a tool that presumably performs web scraping/analysis with zero annotation coverage, this is a significant gap.

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 extremely concise - a single sentence in Chinese that directly states the purpose and usage context. Every word earns its place with no redundancy or unnecessary elaboration. It's front-loaded with the core functionality.

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 that this is a tool that performs web analysis/extraction with no annotations and no output schema, the description is incomplete. It doesn't explain what constitutes '最佳' (best) logo, what format the returned URL will be in, potential limitations or requirements (e.g., the website must be accessible), or error conditions. For a tool with this complexity and no structured metadata, the description should provide more contextual information.

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?

Schema description coverage is 100% (the single parameter 'url' has a clear description in the schema: '要分析的网站URL' - website URL to analyze). The tool description doesn't add any parameter-specific information beyond what's already in the schema. With high schema coverage, the baseline is 3 even without additional param details in the description.

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: '从网站提取并返回最佳Logo的URL地址' (extract and return the best logo URL from a website). It specifies the verb ('提取并返回' - extract and return) and resource ('Logo的URL地址' - logo URL address). However, it doesn't explicitly differentiate from the sibling tool 'analyze_logo' - it only says it's '适用于只需要获取最佳Logo URL的场景' (suitable for scenarios where only the best logo URL is needed), which is somewhat implied differentiation but not explicit.

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

Usage Guidelines3/5

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

The description provides some usage guidance: '适用于只需要获取最佳Logo URL的场景' (suitable for scenarios where only the best logo URL is needed). This implies when to use this tool (when you just need the URL) versus potentially more comprehensive analysis with 'analyze_logo', but it's not explicit about when NOT to use it or clear alternatives. No prerequisites or exclusions are mentioned.

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/OnePieceLwc/logo-mcp'

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