Skip to main content
Glama
mcma123

Firecrawl MCP Server

by mcma123

firecrawl_deep_research

Conduct comprehensive web research by crawling, searching, and analyzing content to gather detailed information on any topic.

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

  • The main handler function for the 'firecrawl_deep_research' tool. Validates input arguments, calls the Firecrawl client's deepResearch method with query and optional parameters (maxDepth, timeLimit, maxUrls), uses callbacks to log research activities and sources, handles the response by returning the finalAnalysis, and includes error handling.
    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();
        server.sendLoggingMessage({
          level: 'info',
          data: `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,
          },
          // Activity callback
          (activity) => {
            server.sendLoggingMessage({
              level: 'info',
              data: `Research activity: ${activity.message} (Depth: ${activity.depth})`,
            });
          },
          // Source callback
          (source) => {
            server.sendLoggingMessage({
              level: 'info',
              data: `Research source found: ${source.url}${source.title ? ` - ${source.title}` : ''}`,
            });
          }
        );
    
        // Log performance metrics
        server.sendLoggingMessage({
          level: 'info',
          data: `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: formattedResponse.finalAnalysis }],
          isError: false,
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        return {
          content: [{ type: 'text', text: errorMessage }],
          isError: true,
        };
      }
    }
  • Defines the Tool metadata including name, description, and detailed inputSchema with properties for query (required), maxDepth, timeLimit, and maxUrls.
    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:863-873 (registration)
    Registers the firecrawl_deep_research tool (as DEEP_RESEARCH_TOOL) in the list of available tools returned by the ListToolsRequestSchema handler.
    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,
    ],
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 the methods (web crawling, search, AI analysis) but doesn't describe key behavioral traits: what 'deep research' entails operationally, whether it's resource-intensive, time-consuming, or has rate limits, what the output format looks like, or any error conditions. For a complex tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

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: 'Conduct deep research on a query using web crawling, search, and AI analysis.' It's front-loaded with the core purpose and uses no unnecessary words. Every part of the sentence contributes to understanding the tool's function.

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 tool's complexity (involving multiple methods like crawling, search, and AI analysis), no annotations, no output schema, and 4 parameters, the description is incomplete. It doesn't explain what 'deep research' outputs, how results are structured, or any behavioral nuances. The agent lacks sufficient context to use this tool effectively compared to simpler siblings, making this inadequate for a tool of this scope.

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%, so the schema already documents all four parameters (query, maxDepth, timeLimit, maxUrls) with descriptions and constraints. The description adds no additional meaning about parameters beyond implying they relate to 'deep research.' It doesn't explain how parameters interact (e.g., how depth affects research) or provide usage examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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: 'Conduct deep research on a query using web crawling, search, and AI analysis.' It specifies the verb ('conduct deep research') and resource ('a query'), but doesn't explicitly differentiate it from sibling tools like firecrawl_search or firecrawl_crawl, which likely have overlapping functionality. The mention of 'deep research' with multiple methods (crawling, search, AI analysis) provides some distinction but isn't specific about how it differs from simpler search or crawl operations.

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. It doesn't mention any prerequisites, exclusions, or compare it to sibling tools like firecrawl_search or firecrawl_crawl. The agent must infer usage based on the vague 'deep research' phrasing, which could apply to many scenarios without clear boundaries.

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

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