Skip to main content
Glama
JayceeTran1995

Firecrawl MCP Server

firecrawl_scrape

Extract content from a single webpage using advanced options like markdown conversion, caching, and brand identity analysis for design replication.

Instructions

Scrape content from a single URL with advanced options. This is the most powerful, fastest and most reliable scraper tool, if available you should always default to using this tool for any web scraping needs.

Best for: Single page content extraction, when you know exactly which page contains the information. Not recommended for: Multiple pages (use batch_scrape), unknown page (use search), structured data (use extract). Common mistakes: Using scrape for a list of URLs (use batch_scrape instead). If batch scrape doesnt work, just use scrape and call it multiple times. Other Features: Use 'branding' format to extract brand identity (colors, fonts, typography, spacing, UI components) for design analysis or style replication. Prompt Example: "Get the content of the page at https://example.com." Usage Example:

{
  "name": "firecrawl_scrape",
  "arguments": {
    "url": "https://example.com",
    "formats": ["markdown"],
    "maxAge": 172800000
  }
}

Performance: Add maxAge parameter for 500% faster scrapes using cached data. Returns: Markdown, HTML, or other formats as specified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
formatsNo
parsersNo
onlyMainContentNo
includeTagsNo
excludeTagsNo
waitForNo
actionsNo
mobileNo
skipTlsVerificationNo
removeBase64ImagesNo
locationNo
storeInCacheNo
maxAgeNo

Implementation Reference

  • Handler function that executes the firecrawl_scrape tool. It extracts the URL and options, cleans the options, gets the Firecrawl client, calls client.scrape, and returns the result as JSON string.
    execute: async (
      args: unknown,
      { session, log }: { session?: SessionData; log: Logger }
    ): Promise<string> => {
      const { url, ...options } = args as { url: string } & Record<
        string,
        unknown
      >;
      const client = getClient(session);
      const cleaned = removeEmptyTopLevel(options as Record<string, unknown>);
      log.info('Scraping URL', { url: String(url) });
      const res = await client.scrape(String(url), {
        ...cleaned,
        origin: ORIGIN,
      } as any);
      return asText(res);
    },
  • Zod schema defining the input parameters for the firecrawl_scrape tool (shared with other scrape-related tools).
    const scrapeParamsSchema = z.object({
      url: z.string().url(),
      formats: z
        .array(
          z.union([
            z.enum([
              'markdown',
              'html',
              'rawHtml',
              'screenshot',
              'links',
              'summary',
              'changeTracking',
              'branding',
            ]),
            z.object({
              type: z.literal('json'),
              prompt: z.string().optional(),
              schema: z.record(z.string(), z.any()).optional(),
            }),
            z.object({
              type: z.literal('screenshot'),
              fullPage: z.boolean().optional(),
              quality: z.number().optional(),
              viewport: z
                .object({ width: z.number(), height: z.number() })
                .optional(),
            }),
          ])
        )
        .optional(),
      parsers: z
        .array(
          z.union([
            z.enum(['pdf']),
            z.object({
              type: z.enum(['pdf']),
              maxPages: z.number().int().min(1).max(10000).optional(),
            }),
          ])
        )
        .optional(),
      onlyMainContent: z.boolean().optional(),
      includeTags: z.array(z.string()).optional(),
      excludeTags: z.array(z.string()).optional(),
      waitFor: z.number().optional(),
      ...(SAFE_MODE
        ? {}
        : {
            actions: z
              .array(
                z.object({
                  type: z.enum(allowedActionTypes),
                  selector: z.string().optional(),
                  milliseconds: z.number().optional(),
                  text: z.string().optional(),
                  key: z.string().optional(),
                  direction: z.enum(['up', 'down']).optional(),
                  script: z.string().optional(),
                  fullPage: z.boolean().optional(),
                })
              )
              .optional(),
          }),
      mobile: z.boolean().optional(),
      skipTlsVerification: z.boolean().optional(),
      removeBase64Images: z.boolean().optional(),
      location: z
        .object({
          country: z.string().optional(),
          languages: z.array(z.string()).optional(),
        })
        .optional(),
      storeInCache: z.boolean().optional(),
      maxAge: z.number().optional(),
    });
  • src/index.ts:262-310 (registration)
    Registration of the 'firecrawl_scrape' tool on the FastMCP server, specifying name, description, input schema, and handler function.
    server.addTool({
      name: 'firecrawl_scrape',
      description: `
    Scrape content from a single URL with advanced options. 
    This is the most powerful, fastest and most reliable scraper tool, if available you should always default to using this tool for any web scraping needs.
    
    **Best for:** Single page content extraction, when you know exactly which page contains the information.
    **Not recommended for:** Multiple pages (use batch_scrape), unknown page (use search), structured data (use extract).
    **Common mistakes:** Using scrape for a list of URLs (use batch_scrape instead). If batch scrape doesnt work, just use scrape and call it multiple times.
    **Other Features:** Use 'branding' format to extract brand identity (colors, fonts, typography, spacing, UI components) for design analysis or style replication.
    **Prompt Example:** "Get the content of the page at https://example.com."
    **Usage Example:**
    \`\`\`json
    {
      "name": "firecrawl_scrape",
      "arguments": {
        "url": "https://example.com",
        "formats": ["markdown"],
        "maxAge": 172800000
      }
    }
    \`\`\`
    **Performance:** Add maxAge parameter for 500% faster scrapes using cached data.
    **Returns:** Markdown, HTML, or other formats as specified.
    ${
      SAFE_MODE
        ? '**Safe Mode:** Read-only content extraction. Interactive actions (click, write, executeJavascript) are disabled for security.'
        : ''
    }
    `,
      parameters: scrapeParamsSchema,
      execute: async (
        args: unknown,
        { session, log }: { session?: SessionData; log: Logger }
      ): Promise<string> => {
        const { url, ...options } = args as { url: string } & Record<
          string,
          unknown
        >;
        const client = getClient(session);
        const cleaned = removeEmptyTopLevel(options as Record<string, unknown>);
        log.info('Scraping URL', { url: String(url) });
        const res = await client.scrape(String(url), {
          ...cleaned,
          origin: ORIGIN,
        } as any);
        return asText(res);
      },
    });
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by mentioning performance characteristics ('fastest and most reliable'), caching behavior ('maxAge parameter for 500% faster scrapes using cached data'), and special features ('branding' format for design analysis). However, it doesn't cover potential limitations like rate limits, authentication needs, or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Best for, Not recommended for, Common mistakes, etc.) and front-loads the core purpose. While comprehensive, some sections like 'Prompt Example' and the full JSON example might be slightly redundant. Most sentences earn their place by providing valuable guidance.

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 the complexity (14 parameters, nested objects, no annotations, no output schema), the description does a good job covering the tool's purpose, usage guidelines, key parameters, and behavioral aspects. It explains what the tool returns ('Markdown, HTML, or other formats'). The main gap is that it doesn't document all 14 parameters, but it covers the most critical ones well.

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 for 14 parameters, the description compensates well by explaining key parameters: it mentions 'maxAge' for caching, 'formats' with examples like markdown and HTML, and the special 'branding' format. The usage example demonstrates url, formats, and maxAge parameters. However, it doesn't cover all 14 parameters, leaving some undocumented.

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's purpose: 'Scrape content from a single URL with advanced options.' It specifies the verb (scrape), resource (content from a single URL), and distinguishes it from siblings by explicitly mentioning alternatives like batch_scrape, search, and extract. The 'Best for' section reinforces this distinction.

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 guidance on when to use this tool vs. alternatives. The 'Best for' and 'Not recommended for' sections clearly define appropriate and inappropriate use cases. It names specific sibling tools (batch_scrape, search, extract) as alternatives and warns against common mistakes like using it for multiple URLs.

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