Skip to main content
Glama
JayceeTran1995

Firecrawl MCP Server

firecrawl_extract

Extract structured data from web pages using LLM capabilities. Define specific information to retrieve like product details or pricing through custom prompts and schemas.

Instructions

Extract structured information from web pages using LLM capabilities. Supports both cloud AI and self-hosted LLM extraction.

Best for: Extracting specific structured data like prices, names, details from web pages. Not recommended for: When you need the full content of a page (use scrape); when you're not looking for specific structured data. Arguments:

  • urls: Array of URLs to extract information from

  • prompt: Custom prompt for the LLM extraction

  • schema: JSON schema for structured data extraction

  • allowExternalLinks: Allow extraction from external links

  • enableWebSearch: Enable web search for additional context

  • includeSubdomains: Include subdomains in extraction Prompt Example: "Extract the product name, price, and description from these product pages." Usage Example:

{
  "name": "firecrawl_extract",
  "arguments": {
    "urls": ["https://example.com/page1", "https://example.com/page2"],
    "prompt": "Extract product information including name, price, and description",
    "schema": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "price": { "type": "number" },
        "description": { "type": "string" }
      },
      "required": ["name", "price"]
    },
    "allowExternalLinks": false,
    "enableWebSearch": false,
    "includeSubdomains": false
  }
}

Returns: Extracted structured data as defined by your schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlsYes
promptNo
schemaNo
allowExternalLinksNo
enableWebSearchNo
includeSubdomainsNo

Implementation Reference

  • The handler function for 'firecrawl_extract' tool. It uses the Firecrawl client to perform extraction on provided URLs using the specified prompt and schema, cleans parameters, logs activity, and returns JSON-formatted results.
    execute: async (
      args: unknown,
      { session, log }: { session?: SessionData; log: Logger }
    ): Promise<string> => {
      const client = getClient(session);
      const a = args as Record<string, unknown>;
      log.info('Extracting from URLs', {
        count: Array.isArray(a.urls) ? a.urls.length : 0,
      });
      const extractBody = removeEmptyTopLevel({
        urls: a.urls as string[],
        prompt: a.prompt as string | undefined,
        schema: (a.schema as Record<string, unknown>) || undefined,
        allowExternalLinks: a.allowExternalLinks as boolean | undefined,
        enableWebSearch: a.enableWebSearch as boolean | undefined,
        includeSubdomains: a.includeSubdomains as boolean | undefined,
        origin: ORIGIN,
      });
      const res = await client.extract(extractBody as any);
      return asText(res);
    },
  • Zod input schema for the 'firecrawl_extract' tool, defining required URLs array and optional fields for extraction prompt, JSON schema, and crawling options.
    parameters: z.object({
      urls: z.array(z.string()),
      prompt: z.string().optional(),
      schema: z.record(z.string(), z.any()).optional(),
      allowExternalLinks: z.boolean().optional(),
      enableWebSearch: z.boolean().optional(),
      includeSubdomains: z.boolean().optional(),
    }),
  • src/index.ts:550-551 (registration)
    Registration of the 'firecrawl_extract' tool using server.addTool, specifying name, description, parameters, and handler.
    server.addTool({
      name: 'firecrawl_extract',
Behavior3/5

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

With no annotations provided, the description carries full burden. It explains the core behavior (LLM-based extraction) and mentions support for both cloud and self-hosted LLMs, but lacks details about rate limits, authentication requirements, error handling, or performance characteristics that would be helpful for an agent.

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 well-structured with clear sections (purpose, guidelines, arguments, examples), uses bold headings effectively, and includes only essential information. Every sentence adds value without redundancy, making it easy to scan and understand.

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?

For a complex tool with 6 parameters, no annotations, and no output schema, the description provides substantial context including purpose, guidelines, parameter explanations, and examples. The main gap is lack of output format details beyond 'extracted structured data as defined by your schema,' which leaves some ambiguity about the return structure.

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?

With 0% schema description coverage and 6 parameters, the description provides meaningful explanations for all parameters in the 'Arguments' section, including a prompt example and usage example that clarifies how parameters work together. This significantly compensates for the schema's lack of descriptions.

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 extracts structured information from web pages using LLM capabilities, specifying both cloud AI and self-hosted options. It distinguishes from sibling tools by explicitly contrasting with 'scrape' for full content extraction, making the purpose specific and differentiated.

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

Usage Guidelines5/5

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

The description provides explicit 'Best for' and 'Not recommended for' sections, clearly stating when to use this tool (extracting specific structured data) versus alternatives like 'scrape' for full content. This gives clear guidance on appropriate usage contexts.

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

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