Skip to main content
Glama
Krieg2065

Firecrawl MCP Server

by Krieg2065

firecrawl_generate_llmstxt

Generate a standardized LLMs.txt file for any URL to define how large language models should interact with the website content.

Instructions

Generate standardized LLMs.txt file for a given URL, which provides context about how LLMs should interact with the website.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to generate LLMs.txt from
maxUrlsNoMaximum number of URLs to process (1-100, default: 10)
showFullTextNoWhether to show the full LLMs-full.txt in the response

Implementation Reference

  • Handler for the firecrawl_generate_llmstxt tool. Validates arguments, calls client.generateLLMsText, formats and returns the LLMs.txt content.
    case 'firecrawl_generate_llmstxt': {
      if (!isGenerateLLMsTextOptions(args)) {
        throw new Error('Invalid arguments for firecrawl_generate_llmstxt');
      }
    
      try {
        const { url, ...params } = args;
        const generateStartTime = Date.now();
    
        safeLog('info', `Starting LLMs.txt generation for URL: ${url}`);
    
        // Start the generation process
        const response = await withRetry(
          async () =>
            // @ts-expect-error Extended API options including origin
            client.generateLLMsText(url, { ...params, origin: 'mcp-server' }),
          'LLMs.txt generation'
        );
    
        if (!response.success) {
          throw new Error(response.error || 'LLMs.txt generation failed');
        }
    
        // Log performance metrics
        safeLog(
          'info',
          `LLMs.txt generation completed in ${Date.now() - generateStartTime}ms`
        );
    
        // Format the response
        let resultText = '';
    
        if ('data' in response) {
          resultText = `LLMs.txt content:\n\n${response.data.llmstxt}`;
    
          if (args.showFullText && response.data.llmsfulltxt) {
            resultText += `\n\nLLMs-full.txt content:\n\n${response.data.llmsfulltxt}`;
          }
        }
    
        return {
          content: [{ type: 'text', text: trimResponseText(resultText) }],
          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 including name, description, and inputSchema for firecrawl_generate_llmstxt.
    const GENERATE_LLMSTXT_TOOL: Tool = {
      name: 'firecrawl_generate_llmstxt',
      description:
        'Generate standardized LLMs.txt file for a given URL, which provides context about how LLMs should interact with the website.',
      inputSchema: {
        type: 'object',
        properties: {
          url: {
            type: 'string',
            description: 'The URL to generate LLMs.txt from',
          },
          maxUrls: {
            type: 'number',
            description: 'Maximum number of URLs to process (1-100, default: 10)',
          },
          showFullText: {
            type: 'boolean',
            description: 'Whether to show the full LLMs-full.txt in the response',
          },
        },
        required: ['url'],
      },
    };
  • src/index.ts:960-973 (registration)
    Registration of the firecrawl_generate_llmstxt tool (as GENERATE_LLMSTXT_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,
      ],
    }));
  • Type guard helper function to validate arguments for the firecrawl_generate_llmstxt tool.
    function isGenerateLLMsTextOptions(
      args: unknown
    ): args is { url: string } & Partial<GenerateLLMsTextParams> {
      return (
        typeof args === 'object' &&
        args !== null &&
        'url' in args &&
        typeof (args as { url: unknown }).url === 'string'
      );
    }
  • TypeScript interface defining parameters for LLMs.txt generation used by the tool.
    interface GenerateLLMsTextParams {
      /**
       * Maximum number of URLs to process (1-100)
       * @default 10
       */
      maxUrls?: number;
      /**
       * Whether to show the full LLMs-full.txt in the response
       * @default false
       */
      showFullText?: boolean;
      /**
       * Experimental flag for streaming
       */
      __experimental_stream?: boolean;
    }
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 but provides minimal information. It mentions generating a 'standardized' file but doesn't describe what the generation process entails (e.g., does it crawl the site? analyze content? follow links?), what permissions might be needed, rate limits, or what the output looks like beyond the file name. For a tool with no annotation coverage, this leaves significant behavioral questions unanswered.

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 clearly states the tool's purpose without unnecessary words. It's appropriately sized for a straightforward tool and front-loads the core functionality ('Generate standardized LLMs.txt file') immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 3 parameters, 100% schema coverage, but no annotations and no output schema, the description provides adequate basic purpose but lacks important context. It doesn't explain what an LLMs.txt file contains, how it differs from robots.txt, what the generation process involves, or what the agent should expect as a result. The description is minimally complete but leaves significant gaps for effective tool selection and invocation.

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 all parameters are documented in the schema. The description adds no additional parameter semantics beyond what's already in the schema descriptions. It mentions 'for a given URL' which aligns with the 'url' parameter but provides no extra context about parameter interactions, defaults, or usage patterns.

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 specific action ('Generate standardized LLMs.txt file') and resource ('for a given URL'), with explicit purpose ('provides context about how LLMs should interact with the website'). It distinguishes from sibling tools like 'scrape', 'crawl', or 'extract' by focusing on generating a specific standardized file format rather than general data extraction.

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 like 'firecrawl_scrape' or 'firecrawl_extract' for similar URL processing tasks. It doesn't mention prerequisites, limitations, or scenarios where this specific LLMs.txt generation is preferred over other data retrieval methods available in the sibling toolset.

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