Skip to main content
Glama
patchwindow

seo-mcp

by patchwindow

bing_url_inspection

Inspect a URL's indexing and crawl status in Bing Webmaster Tools. Returns HTTP status, indexing state, crawl date, page title, link counts, and blockage info.

Instructions

Inspect a URL's indexing and crawl status in Bing Webmaster Tools. Returns HTTP status, indexing state, crawl date, page title, link counts, and whether the URL is blocked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe exact URL to inspect.
site_urlNoYour site URL in Bing Webmaster Tools, e.g. 'https://example.com/'. Uses config default if omitted.

Implementation Reference

  • The main tool handler that calls the Bing API GetUrlInfo endpoint, formats the response into a human-readable text output with indexing status, crawl info, link counts, redirects, and mobile status.
    export const bingUrlInspection: ToolDefinition<typeof schema> = {
      name: "bing_url_inspection",
      description:
        "Inspect a URL's indexing and crawl status in Bing Webmaster Tools. Returns HTTP status, indexing state, crawl date, page title, link counts, and whether the URL is blocked.",
      schema,
      handler: async (args, config) => {
        const apiKey = getBingApiKey();
    
        const siteUrl = args.site_url ?? config.bing?.default_site;
        if (!siteUrl) {
          throw new Error(
            "site_url is required. Pass it as an argument or set bing.default_site in ~/.seo-mcp/config.json"
          );
        }
    
        const data = (await bingGet("GetUrlInfo", { siteUrl, url: args.url }, apiKey)) as BingUrlInfo | null;
    
        if (!data) {
          return { content: [{ type: "text", text: `No data found for URL: ${args.url}` }] };
        }
    
        const lines: string[] = [
          `URL: ${args.url}`,
          `HTTP status: ${data.HttpStatusCode ?? "—"}`,
          `Indexed: ${data.IsIndexed ? "Yes" : "No"}`,
          `Blocked: ${data.IsBlocked ? "Yes" : "No"}`,
          `Blocked by robots.txt: ${data.IsBlockedByRobotsTxt ? "Yes" : "No"}`,
          `Last crawled: ${data.CrawlTime ?? "—"}`,
          `Title: ${data.Title ?? "—"}`,
          `Content length: ${data.ContentLength ? `${data.ContentLength} bytes` : "—"}`,
          `Internal links: ${data.InternalLinkCount ?? "—"}`,
          `External links: ${data.ExternalLinkCount ?? "—"}`,
          `Parameter URL: ${data.IsParamUrl ? "Yes" : "No"}`,
        ];
    
        if (data.RedirectTo) {
          lines.push(`Redirects to: ${data.RedirectTo}`);
        }
        if (data.MobileStatus) {
          lines.push(`Mobile status: ${data.MobileStatus}`);
        }
    
        return { content: [{ type: "text", text: lines.join("\n") }] };
      },
    };
  • Zod schema defining the input parameters: required 'url' and optional 'site_url'.
    const schema = z.object({
      url: z.string().describe("The exact URL to inspect."),
      site_url: z.string().optional().describe(
        "Your site URL in Bing Webmaster Tools, e.g. 'https://example.com/'. Uses config default if omitted."
      ),
    });
  • Registration of bing_url_inspection in the bingTools array alongside other Bing tools.
    export const bingTools: ToolDefinition[] = [
      bingKeywordResearch as unknown as ToolDefinition,
      bingCrawlHealth as unknown as ToolDefinition,
      bingUrlInspection as unknown as ToolDefinition,
      bingSitemapList as unknown as ToolDefinition,
    ];
  • src/server.ts:15-41 (registration)
    Server-side registration: the tool is registered with the MCP server using its name, description, input schema, and handler wrapper.
      const allTools = [...gscTools, ...bingTools];
    
      for (const tool of allTools) {
        server.registerTool(
          tool.name,
          {
            description: tool.description,
            inputSchema: tool.schema,
          },
          async (args) => {
            try {
              const result = await tool.handler(args as never, config);
              return result;
            } catch (err) {
              const message = err instanceof Error ? err.message : String(err);
              return {
                content: [{ type: "text" as const, text: `Error: ${message}` }],
                isError: true,
              };
            }
          }
        );
      }
    
      const transport = new StdioServerTransport();
      await server.connect(transport);
    }
  • Helper that retrieves the Bing API key from environment variables, used by the handler.
    export function getBingApiKey(): string {
      const key = process.env.BING_WEBMASTER_API_KEY;
      if (!key) {
        throw new Error(
          "BING_WEBMASTER_API_KEY not set.\n" +
          "Generate a key at: https://www.bing.com/webmasters → Settings → API Access"
        );
      }
      return key;
    }
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. It describes the tool as inspection with no behavioral disclosure (e.g., readOnly, impact on Bing, rate limits). The list of returned fields is helpful but does not cover behavioral traits.

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 a single paragraph with no wasted words, efficiently conveying the tool's purpose and return data.

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 no output schema, the description lists key return fields (HTTP status, indexing state, etc.), making it reasonably complete. It could mention error handling or unspecified URL scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with clear descriptions. The description adds value by noting that site_url uses a config default if omitted, which goes beyond the schema alone.

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 inspects a URL's indexing and crawl status in Bing Webmaster Tools, listing specific return values. It is distinct from sibling tools like gsc_url_inspection (Google) and bing_crawl_health (aggregate health).

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 implies usage when needing to inspect a specific URL's status, but provides no explicit guidance on when not to use it or how it differs from other Bing tools.

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/patchwindow/seo-mcp'

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