Skip to content

Conversation

MAVRICK-1
Copy link
Contributor

Screencast.From.2025-09-26.16-05-04.mp4

- 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
@MAVRICK-1
Copy link
Contributor Author

MAVRICK-1 commented Sep 26, 2025

@nickscamara done , you can check the video its returning response in json

@MAVRICK-1
Copy link
Contributor Author

{
  "markdown": "![](https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png)\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
  }
}

@nickscamara
Copy link
Member

Seems to be returning the response as text still

@MAVRICK-1
Copy link
Contributor Author

@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants