Skip to main content
Glama
Krieg2065

Firecrawl MCP Server

by Krieg2065

firecrawl_map

Discover and map website URLs from a starting point using sitemap.xml and HTML link analysis to identify connected pages.

Instructions

Discover URLs from a starting point. Can use both sitemap.xml and HTML link discovery.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesStarting URL for URL discovery
searchNoOptional search term to filter URLs
ignoreSitemapNoSkip sitemap.xml discovery and only use HTML links
sitemapOnlyNoOnly use sitemap.xml for discovery, ignore HTML links
includeSubdomainsNoInclude URLs from subdomains in results
limitNoMaximum number of URLs to return

Implementation Reference

  • Handler for the firecrawl_map tool. Validates input using isMapOptions, calls client.mapUrl with the URL and options, processes the response.links, and returns them as text content.
    case 'firecrawl_map': {
      if (!isMapOptions(args)) {
        throw new Error('Invalid arguments for firecrawl_map');
      }
      const { url, ...options } = args;
      const response = await client.mapUrl(url, {
        ...options,
        // @ts-expect-error Extended API options including origin
        origin: 'mcp-server',
      });
      if ('error' in response) {
        throw new Error(response.error);
      }
      if (!response.links) {
        throw new Error('No links received from Firecrawl API');
      }
      return {
        content: [
          { type: 'text', text: trimResponseText(response.links.join('\n')) },
        ],
        isError: false,
      };
    }
  • Tool schema definition including name, description, and inputSchema for firecrawl_map.
    const MAP_TOOL: Tool = {
      name: 'firecrawl_map',
      description:
        'Discover URLs from a starting point. Can use both sitemap.xml and HTML link discovery.',
      inputSchema: {
        type: 'object',
        properties: {
          url: {
            type: 'string',
            description: 'Starting URL for URL discovery',
          },
          search: {
            type: 'string',
            description: 'Optional search term to filter URLs',
          },
          ignoreSitemap: {
            type: 'boolean',
            description: 'Skip sitemap.xml discovery and only use HTML links',
          },
          sitemapOnly: {
            type: 'boolean',
            description: 'Only use sitemap.xml for discovery, ignore HTML links',
          },
          includeSubdomains: {
            type: 'boolean',
            description: 'Include URLs from subdomains in results',
          },
          limit: {
            type: 'number',
            description: 'Maximum number of URLs to return',
          },
        },
        required: ['url'],
      },
    };
  • src/index.ts:960-973 (registration)
    Registration of all tools including MAP_TOOL (firecrawl_map) in the ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        SCRAPE_TOOL,
        MAP_TOOL,
        CRAWL_TOOL,
        BATCH_SCRAPE_TOOL,
        CHECK_BATCH_STATUS_TOOL,
        CHECK_CRAWL_STATUS_TOOL,
        SEARCH_TOOL,
        EXTRACT_TOOL,
        DEEP_RESEARCH_TOOL,
        GENERATE_LLMSTXT_TOOL,
      ],
    }));
  • Type guard helper function isMapOptions used to validate arguments for firecrawl_map.
    function isMapOptions(args: unknown): args is MapParams & { url: string } {
      return (
        typeof args === 'object' &&
        args !== null &&
        'url' in args &&
        typeof (args as { url: unknown }).url === 'string'
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions discovery methods (sitemap.xml and HTML links) but lacks critical details: it doesn't specify if this is a read-only operation, potential rate limits, authentication needs, output format, or whether it performs recursive crawling. For a discovery tool with 6 parameters, this leaves significant behavioral gaps.

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 perfectly concise with two clear sentences that front-load the core purpose. Every word earns its place: the first sentence states what the tool does, and the second adds important technical context about discovery methods without redundancy.

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?

For a discovery tool with 6 parameters and no annotations or output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., list of URLs, metadata), how results are structured, potential limitations, or error conditions. Given the complexity implied by multiple discovery methods and filtering options, more behavioral context is needed.

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%, providing good parameter documentation. The description adds minimal value beyond the schema by mentioning 'sitemap.xml and HTML link discovery,' which relates to the 'ignoreSitemap' and 'sitemapOnly' parameters. However, it doesn't explain parameter interactions or provide additional context beyond what's already in the schema descriptions.

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: 'Discover URLs from a starting point' specifies the verb (discover) and resource (URLs). It distinguishes from siblings like 'scrape' or 'extract' by focusing on discovery rather than content extraction. However, it doesn't explicitly differentiate from 'firecrawl_crawl' which might have overlapping functionality.

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 context by mentioning 'both sitemap.xml and HTML link discovery,' suggesting this tool is for initial URL discovery rather than content processing. However, it doesn't provide explicit guidance on when to use this vs. alternatives like 'firecrawl_crawl' or 'firecrawl_search,' nor does it specify prerequisites or exclusions.

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/Krieg2065/firecrawl-mcp-server'

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