Skip to main content
Glama
Krieg2065

Firecrawl MCP Server

by Krieg2065

firecrawl_deep_research

Conduct deep web research on any query using crawling, search, and AI analysis to gather comprehensive information from multiple sources.

Instructions

Conduct deep research on a query using web crawling, search, and AI analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe query to research
maxDepthNoMaximum depth of research iterations (1-10)
timeLimitNoTime limit in seconds (30-300)
maxUrlsNoMaximum number of URLs to analyze (1-1000)

Implementation Reference

  • Handler for the firecrawl_deep_research tool. Validates input arguments and calls the Firecrawl client's deepResearch method with callbacks for logging activities and sources. Formats and returns the final analysis.
    case 'firecrawl_deep_research': {
      if (!args || typeof args !== 'object' || !('query' in args)) {
        throw new Error('Invalid arguments for firecrawl_deep_research');
      }
    
      try {
        const researchStartTime = Date.now();
        safeLog('info', `Starting deep research for query: ${args.query}`);
    
        const response = await client.deepResearch(
          args.query as string,
          {
            maxDepth: args.maxDepth as number,
            timeLimit: args.timeLimit as number,
            maxUrls: args.maxUrls as number,
            // @ts-expect-error Extended API options including origin
            origin: 'mcp-server',
          },
          // Activity callback
          (activity) => {
            safeLog(
              'info',
              `Research activity: ${activity.message} (Depth: ${activity.depth})`
            );
          },
          // Source callback
          (source) => {
            safeLog(
              'info',
              `Research source found: ${source.url}${source.title ? ` - ${source.title}` : ''}`
            );
          }
        );
    
        // Log performance metrics
        safeLog(
          'info',
          `Deep research completed in ${Date.now() - researchStartTime}ms`
        );
    
        if (!response.success) {
          throw new Error(response.error || 'Deep research failed');
        }
    
        // Format the results
        const formattedResponse = {
          finalAnalysis: response.data.finalAnalysis,
          activities: response.data.activities,
          sources: response.data.sources,
        };
    
        return {
          content: [
            {
              type: 'text',
              text: trimResponseText(formattedResponse.finalAnalysis),
            },
          ],
          isError: false,
        };
      } catch (error) {
        const errorMessage =
          error instanceof Error ? error.message : String(error);
        return {
          content: [{ type: 'text', text: trimResponseText(errorMessage) }],
          isError: true,
        };
      }
    }
  • Tool schema definition for firecrawl_deep_research, including name, description, and input schema for validation.
    const DEEP_RESEARCH_TOOL: Tool = {
      name: 'firecrawl_deep_research',
      description:
        'Conduct deep research on a query using web crawling, search, and AI analysis.',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'The query to research',
          },
          maxDepth: {
            type: 'number',
            description: 'Maximum depth of research iterations (1-10)',
          },
          timeLimit: {
            type: 'number',
            description: 'Time limit in seconds (30-300)',
          },
          maxUrls: {
            type: 'number',
            description: 'Maximum number of URLs to analyze (1-1000)',
          },
        },
        required: ['query'],
      },
    };
  • src/index.ts:960-973 (registration)
    Registration of the firecrawl_deep_research tool (as DEEP_RESEARCH_TOOL) in the listTools request 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,
      ],
    }));
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 of behavioral disclosure. It mentions 'deep research' and methods like 'web crawling, search, and AI analysis', but fails to detail critical behaviors such as rate limits, authentication needs, potential costs, or what 'deep' entails (e.g., iterative analysis, multi-source synthesis). This leaves significant gaps for a tool with complex operations.

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, efficient sentence that front-loads the core purpose without unnecessary details. Every word contributes to understanding the tool's function, making it appropriately sized and well-structured.

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?

Given the complexity implied by 'deep research' and the lack of annotations and output schema, the description is insufficient. It does not explain what the tool returns (e.g., a report, summarized findings, raw data), how results are formatted, or any error conditions, leaving the agent with incomplete context for effective use.

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%, meaning the input schema already documents all parameters well. The description does not add any additional meaning or context beyond what the schema provides (e.g., it doesn't explain how parameters like 'maxDepth' or 'timeLimit' affect the research process). Thus, it meets the baseline score of 3 for high schema coverage.

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 with specific verbs ('conduct deep research') and resources ('on a query'), and mentions the methods used ('web crawling, search, and AI analysis'). However, it does not explicitly differentiate from sibling tools like 'firecrawl_search' or 'firecrawl_crawl', which may have overlapping functionality, preventing a score of 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, such as the sibling tools listed. It lacks explicit instructions on context, prerequisites, or exclusions, leaving the agent to infer usage based on the generic description alone.

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