-
Notifications
You must be signed in to change notification settings - Fork 502
Add context limit support #114
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
Open
MAVRICK-1
wants to merge
3
commits into
firecrawl:main
Choose a base branch
from
MAVRICK-1:add-context-limit-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
- Add maxResponseSize parameter to all tools (scrape, map, search, crawl, check_crawl_status, extract) - Implement intelligent content truncation in asText function - Add truncation message when content exceeds specified limit - Update tool descriptions with usage examples - Add comprehensive documentation in README - Maintain full backward compatibility - Addresses GitHub issue #2165 for bounty
- Fixed JSON structure preservation when using maxResponseSize - Now truncates only content fields (markdown, html, etc.) instead of breaking JSON - Maintains all metadata, links, and structural data - Adds clear truncation message within content fields - Ensures MCP compatibility with proper JSON responses
- Updated package.json and package-lock.json from main - Preserved maxResponseSize implementation in src/index.ts - Added pnpm-lock.yaml from main branch
@nickscamara done , you can check the video its returning response in json |
{
"markdown": "\n\n# Wikipedia **The Free Encyclopedia**\n\nSearch Wikipedia\n\nenAfrikaansShqipالعربيةAsturianuAzərbaycancaБългарски閩南語 / Bân-lâm-gúবাংলাБеларускаяCatalàČeštinaCymraegDanskDeutschEestiΕλληνικάEnglishEspañolEsperantoEuskaraفارسیFrançaisGalego한국어Հայերենहिन्दीHrvatskiBahasa IndonesiaItalianoעבריתქართულიLadinLatinaLatviešuLietuviųMagyarМакедонскиMalagasyमराठीمصرىBahasa MelayuBahaso Minangkabauမြန်မာဘာသာNederlands日本語Norsk (bokmål)Norsk (nynorsk)НохчийнOʻzbekcha / ЎзбекчаPolskiPortuguêsҚазақша / Qazaqşa / قازاقشاRomânăSimple EnglishSinugboanong BinisayaSlovenčinaSlovenščinaСрпски / SrpskiSrpskohrvatski / СрпскохрватскиSuomiSvenskaKiswahiliதமிழ்Татарча / TatarçaతెలుగుภาษาไทยТоҷикӣتۆرکجهTürkçeУкраїнськаاردوTiếng ViệtWinaray中文Русский粵語\n\n_Search_\n\n* * *",
"metadata": {
"language": "en",
"og:description": "Wikipedia is a free online encyclopedia, created and edited by volunteers around the world and hosted by the Wikimedia Foundation.",
"favicon": "https://www.wikipedia.org/static/apple-touch/wikipedia.png",
"og:image": "https://upload.wikimedia.org/wikipedia/en/thumb/8/80/Wikipedia-logo-v2.svg/2244px-Wikipedia-logo-v2.svg.png",
"title": "Wikipedia",
"og:type": "website",
"ogDescription": "Wikipedia is a free online encyclopedia, created and edited by volunteers around the world and hosted by the Wikimedia Foundation.",
"og:url": "",
"og:title": "Wikipedia, the free encyclopedia",
"ogUrl": "",
"description": "Wikipedia is a free online encyclopedia, created and edited by volunteers around the world and hosted by the Wikimedia Foundation.",
"ogTitle": "Wikipedia, the free encyclopedia",
"viewport": "initial-scale=1,user-scalable=yes",
"ogImage": "https://upload.wikimedia.org/wikipedia/en/thumb/8/80/Wikipedia-logo-v2.svg/2244px-Wikipedia-logo-v2.svg.png",
"scrapeId": "abdd9e61-dcee-4f78-9bd9-2ab1aa76ab59",
"sourceURL": "https://www.wikipedia.org",
"url": "https://www.wikipedia.org/",
"statusCode": 200,
"contentType": "text/html",
"proxyUsed": "basic",
"cacheState": "hit",
"cachedAt": "2025-09-26T10:28:57.827Z",
"creditsUsed": 1
}
} |
Seems to be returning the response as text still |
@nickscamara can you please clarify more , what should the response look like |
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.
Screencast.From.2025-09-26.16-05-04.mp4