Implement maxAge fast scraping parameter#73
Merged
nickscamara merged 3 commits intomainfrom Jun 30, 2025
Merged
Conversation
- Add maxAge parameter to SCRAPE_TOOL inputSchema with proper description - Update tool description to highlight 500% performance improvement - Add test coverage for maxAge parameter functionality - Parameter enables cached scraping for faster response times Fixes #69 Co-Authored-By: Nick <nicolascamara29@gmail.com>
Co-Authored-By: Nick <nicolascamara29@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Accept main branch version 1.11.0 - Merge main branch changes into feature branch Co-Authored-By: Nick <nicolascamara29@gmail.com>
Member
|
closes #69 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement maxAge fast scraping parameter
Summary
This PR implements the
maxAgeparameter for the firecrawl-mcp-server to enable faster scraping through caching, addressing GitHub issue #69. The implementation exposes the existing Firecrawl APImaxAgeparameter through the MCP server's tool schema.Key changes:
maxAgeparameter to SCRAPE_TOOL inputSchema as optional number fieldThe
maxAgeparameter allows users to specify a cache duration in milliseconds. When set, the system will use cached content if available and younger than the specified age, otherwise scrape fresh content.Review & Testing Checklist for Human
Recommended test plan: Create a test script that scrapes the same URL twice with maxAge set, verify the second call is faster and returns cached content.
Diagram
%%{ init : { "theme" : "default" }}%% graph TD subgraph "MCP Server Implementation" IndexTS["src/index.ts"]:::major-edit IndexTestTS["src/index.test.ts"]:::major-edit end subgraph "Tool Schema" SCRAPE_TOOL["SCRAPE_TOOL definition"]:::major-edit InputSchema["inputSchema.properties"]:::major-edit end subgraph "External Dependencies" FirecrawlSDK["@mendable/firecrawl-js"]:::context ScrapeParams["ScrapeParams type"]:::context end IndexTS --> SCRAPE_TOOL SCRAPE_TOOL --> InputSchema InputSchema --> |"maxAge: number"| FirecrawlSDK IndexTestTS --> |"tests maxAge passing"| FirecrawlSDK FirecrawlSDK --> ScrapeParams subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
ScrapeParamstype to handle maxAge validation