-
Notifications
You must be signed in to change notification settings - Fork 98
feat(skills): support MCP-first execution and clarify CLI fallback hierarchy #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,15 +2,19 @@ | |
| name: firecrawl-parse | ||
| description: | | ||
| Convert a local file (PDF, DOCX, XLSX, HTML, …) to markdown, or answer questions about its content. Use whenever the input is a file path, not a URL. | ||
| allowed-tools: | ||
| - Bash(firecrawl *) | ||
| - Bash(npx firecrawl-cli *) | ||
| --- | ||
|
|
||
| # firecrawl parse | ||
|
|
||
| Turn a local document into clean markdown on disk. Supports **PDF, DOCX, DOC, ODT, RTF, XLSX, XLS, HTML/HTM**. | ||
|
|
||
| ## Tool Choice & Quick Start | ||
|
|
||
| - MCP: **`firecrawl_parse(filePath?, formats?, ...)`** | ||
| Call directly when Firecrawl MCP tools are exposed. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: When the exposed MCP server is hosted remotely, it cannot read a local Prompt for AI agents |
||
| - CLI: **`firecrawl parse <file> [-o <path>]`** | ||
| Fallback when running in a CLI environment. | ||
|
|
||
| ## Quick start | ||
|
|
||
| Always save to `.firecrawl/` with `-o` — parsed docs can be hundreds of KB and blow up context if streamed to stdout. Add `.firecrawl/` to `.gitignore`. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,15 +2,20 @@ | |
| name: firecrawl-search | ||
| description: | | ||
| Web search with full page content. Use when no URL is known: finding sources, articles, or news. For papers use firecrawl-research-index; for library, API, error, or bug questions use firecrawl-developer-index. | ||
| allowed-tools: | ||
| - Bash(firecrawl *) | ||
| - Bash(npx firecrawl-cli *) | ||
| --- | ||
|
|
||
| # firecrawl search | ||
|
|
||
| Web search with optional content scraping. Returns search results as JSON, optionally with full page content. | ||
|
|
||
| ## Tool Choice & Quick Start | ||
|
|
||
| - MCP: **`firecrawl_search(query, scrapeOptions?, categories?, limit?, sources?, ...)`** | ||
| Call directly when Firecrawl MCP tools are exposed. | ||
| Feedback: **`firecrawl_search_feedback(searchId, rating, ...)`** | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: In an MCP-only environment, the required feedback step still invokes Prompt for AI agents |
||
| - CLI: **`firecrawl search <query> [--scrape] [--json] [-o <path>]`** | ||
| Fallback when running in a CLI environment. | ||
|
|
||
| ## Quick start | ||
|
|
||
| ```bash | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,13 +2,20 @@ | |||||
| name: firecrawl | ||||||
| description: | | ||||||
| Any live-web task via the Firecrawl CLI — including ordinary web research: searching the web, reading or extracting pages, gathering sources, discovering site URLs, bulk extraction, downloading a site, change alerts, or pages needing clicks/login — web only; local files route to firecrawl-parse. For papers use firecrawl-research-index; for library, API, error, or bug questions use firecrawl-developer-index. | ||||||
| allowed-tools: | ||||||
| - Bash(firecrawl *) | ||||||
| - Bash(npx firecrawl-cli *) | ||||||
| --- | ||||||
|
|
||||||
| # Firecrawl CLI | ||||||
|
|
||||||
| ## Tool Selection Hierarchy | ||||||
|
|
||||||
| Follow this precedence order based on your current execution environment: | ||||||
|
|
||||||
| 1. **MCP First (Recommended)**: If Firecrawl MCP tools (`firecrawl_search`, `firecrawl_scrape`, `firecrawl_map`, `firecrawl_crawl`, `firecrawl_agent`, `firecrawl_interact`, `firecrawl_parse`, `firecrawl_monitor_*`, `firecrawl_developer_search`, `firecrawl_research_*`) are available in the tool catalog, **call the MCP tools directly**. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: When the CLI is absent, MCP-first execution bypasses this skill's required Prompt for AI agentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: On MCP-only hosts, this new route leaves the required search-feedback step pointing at the missing Prompt for AI agents |
||||||
| 2. **CLI Fallback**: If MCP tools are not exposed, check if the `firecrawl` CLI is installed on `PATH` and run CLI commands. | ||||||
| 3. **Missing Local CLI != Unavailable**: If `firecrawl` command is not found on `PATH`, do **not** declare Firecrawl unavailable without checking for exposed MCP tools first. **Do not run unauthorized `npx` commands or install packages silently**. | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| Search, scrape, and interact with the web. Returns clean markdown optimized for LLM context windows. | ||||||
|
|
||||||
| Run `firecrawl --help` or `firecrawl <command> --help` for full option details. For app integration or outcome workflows (research briefs, SEO audits, etc.), route to the `firecrawl-build` / `firecrawl-workflows` skills — see [When to Load References](#when-to-load-references). | ||||||
|
|
@@ -30,19 +37,19 @@ Follow this escalation pattern: | |||||
| 5. **Monitor** - Need recurring checks or ongoing alerts. Prefer setting a monitor with `--page` plus `--goal` instead of doing repeated one-off scrapes. | ||||||
| 6. **Interact** - Scrape first, then interact with the page (pagination, modals, form submissions, multi-step navigation). | ||||||
|
|
||||||
| | Need | Command | When | | ||||||
| | --------------------------- | --------------------- | --------------------------------------------------------------- | | ||||||
| | Find pages on a topic | `search` | No specific URL yet | | ||||||
| | Find research papers | `research` | Biomedical/clinical/scientific literature — use the paper index | | ||||||
| | Answer a coding question | `developer` | Issues, merged PRs, READMEs, and docs — not a general web page | | ||||||
| | Get a page's content | `scrape` | Have a URL, page is static or JS-rendered | | ||||||
| | Find URLs within a site | `map` | Need to locate a specific subpage | | ||||||
| | Bulk extract a site section | `crawl` | Need many pages (e.g., all /docs/) | | ||||||
| | AI-powered data extraction | `agent` | Need structured data from complex sites | | ||||||
| | Interact with a page | `scrape` + `interact` | Content requires clicks, form fills, pagination, or login | | ||||||
| | Download a site to files | `x download` | Save an entire site as local files | | ||||||
| | Parse a local file | `parse` | File on disk (PDF, DOCX, XLSX, etc.) — not a URL | | ||||||
| | Watch pages for changes | `monitor` | Schedule recurring scrapes/crawls, diff against snapshots | | ||||||
| | Need | MCP Tool | CLI Command | When | | ||||||
| | --------------------------- | ------------------------------------ | --------------------- | --------------------------------------------------------------- | | ||||||
| | Find pages on a topic | `firecrawl_search` | `search` | No specific URL yet | | ||||||
| | Find research papers | `firecrawl_research_search_papers` | `research` | Biomedical/clinical/scientific literature — use the paper index | | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: When CLI fallback handles a paper search, this row directs the agent to run Prompt for AI agents
Suggested change
|
||||||
| | Answer a coding question | `firecrawl_developer_search` | `developer` | Issues, merged PRs, READMEs, and docs — not a general web page | | ||||||
| | Get a page's content | `firecrawl_scrape` | `scrape` | Have a URL, page is static or JS-rendered | | ||||||
| | Find URLs within a site | `firecrawl_map` | `map` | Need to locate a specific subpage | | ||||||
| | Bulk extract a site section | `firecrawl_crawl` | `crawl` | Need many pages (e.g., all /docs/) | | ||||||
| | AI-powered data extraction | `firecrawl_agent` | `agent` | Need structured data from complex sites | | ||||||
| | Interact with a page | `firecrawl_interact` | `scrape` + `interact` | Content requires clicks, form fills, pagination, or login | | ||||||
| | Download a site to files | `firecrawl_map` + `firecrawl_scrape` | `x download` | Save an entire site as local files | | ||||||
| | Parse a local file | `firecrawl_parse` | `parse` | File on disk (PDF, DOCX, XLSX, etc.) — not a URL | | ||||||
| | Watch pages for changes | `firecrawl_monitor_create` | `monitor` | Schedule recurring scrapes/crawls, diff against snapshots | | ||||||
|
|
||||||
| For detailed command reference, run `firecrawl <command> --help`. | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,12 @@ description: | | |
|
|
||
| # Firecrawl CLI Installation | ||
|
|
||
| ## Important: Tool Availability & Execution Hierarchy | ||
|
|
||
| 1. **Check for Native MCP Tools First**: Before attempting to install or check the CLI, verify whether Firecrawl MCP tools (e.g. `firecrawl_search`, `firecrawl_scrape`, `firecrawl_crawl`, `firecrawl_map`, etc.) are exposed in your current agent environment. If MCP tools are available, **use them directly** without installing the CLI. | ||
| 2. **Missing Local CLI != Firecrawl Unavailable**: If `firecrawl` command is not found on `PATH`, this only means the CLI executable is absent locally; it does not mean Firecrawl functionality is unavailable. Check for MCP tools before reporting failure. | ||
| 3. **No Unauthorized Package Installation**: Agents must **not** execute `npx firecrawl-cli init` or install npm packages unless explicitly requested by the user. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Rule 3 forbids running Prompt for AI agents |
||
|
|
||
| ## Quick Setup (Recommended) | ||
|
|
||
| ```bash | ||
|
|
@@ -84,8 +90,8 @@ If you cannot obtain a key and the user cannot sign up, search, scrape, and inte | |
|
|
||
| ### Command not found | ||
|
|
||
| If `firecrawl` is not found after installation: | ||
| If `firecrawl` is not found: | ||
|
|
||
| 1. Ensure npm global bin is in PATH | ||
| 2. Try: `npx firecrawl-cli@latest --version` | ||
| 3. Reinstall: `npm install -g firecrawl-cli@latest` | ||
| 1. Check if Firecrawl MCP tools are exposed in the agent environment — if so, use them directly instead of troubleshooting CLI. | ||
| 2. If CLI is explicitly needed, ensure npm global bin directory is included in `PATH`. | ||
| 3. If CLI installation was requested by the user, install via `npm install -g firecrawl-cli@latest`. | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The MCP-first instruction loses the download skill's core behavior. It tells the agent only to 'extract and save page contents' with
firecrawl_scrape, but that tool returns content into the conversation and does not write local files or screenshots unless the agent explicitly requestsformats: ["markdown", "screenshot"]and writes them itself. A user asking to 'download the site' (with screenshots, per the CLI--screenshot) in an MCP-first environment gets in-chat content rather than the local.firecrawl/file tree the CLI produces. Ask the agent to request the screenshot/markdown formats and save each page to.firecrawl/, so the two paths stay equivalent.Prompt for AI agents