Skip to main content
Glama
ashishdevthakur3-max

Firecrawl MCP Server

firecrawl_generate_llmstxt

Generate machine-readable permission guidelines (LLMs.txt files) for websites to define how AI models should interact with their content.

Instructions

Generate a standardized llms.txt (and optionally llms-full.txt) file for a given domain. This file defines how large language models should interact with the site.

Best for: Creating machine-readable permission guidelines for AI models. Not recommended for: General content extraction or research. Arguments:

  • url (string, required): The base URL of the website to analyze.

  • maxUrls (number, optional): Max number of URLs to include (default: 10).

  • showFullText (boolean, optional): Whether to include llms-full.txt contents in the response. Prompt Example: "Generate an LLMs.txt file for example.com." Usage Example:

{
  "name": "firecrawl_generate_llmstxt",
  "arguments": {
    "url": "https://example.com",
    "maxUrls": 20,
    "showFullText": true
  }
}

Returns: LLMs.txt file contents (and optionally llms-full.txt).

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 logic for the firecrawl_generate_llmstxt tool.
    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,
        };
      }
    }
  • Schema definition for the firecrawl_generate_llmstxt tool.
    const GENERATE_LLMSTXT_TOOL: Tool = {
      name: 'firecrawl_generate_llmstxt',
      description: `
    Generate a standardized llms.txt (and optionally llms-full.txt) file for a given domain. This file defines how large language models should interact with the site.
    
    **Best for:** Creating machine-readable permission guidelines for AI models.
    **Not recommended for:** General content extraction or research.
    **Arguments:**
    - url (string, required): The base URL of the website to analyze.
    - maxUrls (number, optional): Max number of URLs to include (default: 10).
    - showFullText (boolean, optional): Whether to include llms-full.txt contents in the response.
    **Prompt Example:** "Generate an LLMs.txt file for example.com."
    **Usage Example:**
    \`\`\`json
    {
      "name": "firecrawl_generate_llmstxt",
      "arguments": {
        "url": "https://example.com",
        "maxUrls": 20,
        "showFullText": true
      }
    }
    \`\`\`
    **Returns:** LLMs.txt file contents (and optionally llms-full.txt).
    `,
      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:972-972 (registration)
    Registration of the firecrawl_generate_llmstxt tool in the server request handler.
    ],
Behavior3/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 explains what the tool generates (llms.txt files) and mentions optional llms-full.txt, but doesn't describe rate limits, authentication requirements, processing time, error conditions, or what happens when maxUrls is exceeded. It provides basic behavioral context but lacks operational details.

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, Arguments, Prompt Example, Usage Example, Returns). While slightly longer than minimal, every section adds value and the information is front-loaded with the core purpose. The structure helps the agent quickly understand the tool's use.

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 tool's moderate complexity (analyzing a domain to generate permission files), no annotations, and no output schema, the description provides good context about what the tool does, when to use it, parameters, and return values. It could be more complete by explaining the analysis process or output format details, but covers the essentials adequately.

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 parameters thoroughly. The description lists the parameters with brief explanations but doesn't add significant semantic value beyond what's in the schema. The baseline of 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.

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 a standardized llms.txt file') and resource ('for a given domain'), distinguishing it from siblings like 'crawl', 'extract', or 'scrape' by focusing on permission guideline creation rather than content extraction. It explicitly defines the purpose as creating machine-readable permission guidelines for AI models.

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 with 'Best for:' (creating machine-readable permission guidelines) and 'Not recommended for:' (general content extraction or research), clearly differentiating when to use this tool versus its siblings. This gives the agent clear context about appropriate use cases.

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/ashishdevthakur3-max/firecrawl-mcp'

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