Skip to main content
Glama
patchwindow

seo-mcp

by patchwindow

bing_sitemap_list

Retrieve all sitemaps submitted to Bing Webmaster Tools for a site, showing URL counts, indexed counts, errors, and last crawl time.

Instructions

List all sitemaps submitted to Bing Webmaster Tools for a site, including URL counts, indexed counts, errors, and last crawl time.

Input Schema

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

Implementation Reference

  • Core handler for bing_sitemap_list tool. Calls Bing 'GetFeeds' API, formats sitemap data (URL counts, errors, warnings, crawl times) into a human-readable text response.
    export const bingSitemapList: ToolDefinition<typeof schema> = {
      name: "bing_sitemap_list",
      description:
        "List all sitemaps submitted to Bing Webmaster Tools for a site, including URL counts, indexed counts, errors, and last crawl time.",
      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("GetFeeds", { siteUrl }, apiKey)) as BingFeed[] | null;
        const feeds = Array.isArray(data) ? data : [];
    
        if (feeds.length === 0) {
          return {
            content: [{ type: "text", text: `No sitemaps found for ${siteUrl} in Bing Webmaster Tools.` }],
          };
        }
    
        const lines = feeds.map((f) => {
          const statusParts = [];
          if ((f.ErrorCount ?? 0) > 0) statusParts.push(`${f.ErrorCount} errors`);
          if ((f.WarningCount ?? 0) > 0) statusParts.push(`${f.WarningCount} warnings`);
          const status = statusParts.length > 0 ? statusParts.join(", ") : f.Status ?? "OK";
    
          return [
            `URL: ${f.FeedUrl ?? "—"}`,
            `  Type: ${f.Type ?? "—"} | Status: ${status}`,
            `  URLs: ${f.UrlCount ?? "—"} submitted, ${f.IndexedUrlCount ?? "—"} indexed`,
            `  Submitted: ${f.SubmitTime ?? "—"} | Last crawled: ${f.LastCrawlTime ?? "—"}`,
            f.FileSize ? `  File size: ${(f.FileSize / 1024).toFixed(1)} KB` : "",
          ]
            .filter(Boolean)
            .join("\n");
        });
    
        return {
          content: [{ type: "text", text: `Sitemaps for ${siteUrl} in Bing (${feeds.length} total):\n\n${lines.join("\n\n")}` }],
        };
      },
    };
  • Zod schema defining optional site_url input parameter.
    const schema = z.object({
      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 bingSitemapList in the array of Bing tools exported from the bing index module.
    export const bingTools: ToolDefinition[] = [
      bingKeywordResearch as unknown as ToolDefinition,
      bingCrawlHealth as unknown as ToolDefinition,
      bingUrlInspection as unknown as ToolDefinition,
      bingSitemapList as unknown as ToolDefinition,
    ];
  • Helper functions getBingApiKey() and bingGet() used by the handler to authenticate and call the Bing Webmaster Tools API.
    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;
    }
    
    const BING_BASE_URL = "https://ssl.bing.com/webmaster/api.svc/json";
    
    export async function bingGet(
      method: string,
      params: Record<string, string | number | undefined>,
      apiKey: string
    ): Promise<unknown> {
      const url = new URL(`${BING_BASE_URL}/${method}`);
      url.searchParams.set("apikey", apiKey);
    
      for (const [k, v] of Object.entries(params)) {
        if (v !== undefined) url.searchParams.set(k, String(v));
      }
    
      const res = await fetch(url.toString(), {
        headers: { Accept: "application/json" },
      });
    
      if (!res.ok) {
        const body = await res.text().catch(() => "");
        throw new Error(`Bing API error ${res.status} on ${method}: ${body}`);
      }
    
      const json = (await res.json()) as { d?: unknown };
      return json.d ?? json;
    }
Behavior3/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 discloses the return contents (URL counts, indexed counts, errors, last crawl time) but does not mention authentication requirements, rate limits, or side effects. For a list tool, it's adequate but not comprehensive.

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 sentence that is front-loaded with the verb and resource, and efficiently lists included data without extraneous words.

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

Completeness5/5

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

For a simple list tool with no output schema, the description sufficiently explains return values (URL counts, indexed counts, errors, last crawl time). No additional context needed for this low-complexity tool.

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?

There is one parameter (site_url) with 100% schema description coverage. The tool description does not further elaborate on the parameter beyond what the schema provides. The schema already describes the parameter clearly, including the default behavior. Baseline score of 3 is appropriate.

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 verb 'list', the resource 'sitemaps submitted to Bing Webmaster Tools', and the specific data included (URL counts, indexed counts, errors, last crawl time). It distinguishes from sibling tools like gsc_sitemap_list by specifying Bing.

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 Bing sitemap info but does not explicitly state when to use this tool over alternatives (e.g., gsc_sitemap_list). No exclusions or prerequisites 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/patchwindow/seo-mcp'

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