Agent view · Findings · 2026-11-22
Both our SDKs crashed on tool lists nested too deeply
This is the response this server returns to a client that asks for Accept: text/markdown at https://crawlcheck.io/blog/our-sdks-crashed-on-tool-lists-nested-too-deeply: fetched when you opened this page, shown byte for byte. An assistant, a crawler that negotiates markdown, or anything reading our feed gets exactly this. The markdown leaves signed (RFC 9421, key in our key directory), so a crawler can prove the page it read is the page this server sent; the check is shown below.
| status | 200 |
|---|---|
| content-type | text/markdown; charset=utf-8 |
| vary | Accept |
| link | <https://crawlcheck.io/llms.txt>; rel="describedby"; type="text/plain", <https://crawlcheck.io/.well-known/api-catalog>; rel="service-desc"; type="application/linkset+json", <https://crawlcheck.io/blog/our-sdks-crashed-on-tool-lists-nested-too-deeply>; rel="cite-as", <https://crawlcheck.io/.well-known/http-message-signatures-directory>; rel="http-message-signatures-directory" |
| cache-control | public, max-age=900, stale-while-revalidate=2400 |
| bytes | 18,655 |
| words | 2,876 |
| sha-256 | 4dabd52961ae94e72fe00b03df4dae73db419b40ca3c45a6ab942af57a1252d2 |
| repr-digest | sha-256=:TavVKWGulOcv4AsD302uc9tBm0DKPEWmq5Qq9XoSUtI=: ← matches the body shown |
| signature-input | sig1=("@authority";req "@path";req "repr-digest" "content-type");created=1795580735;expires=1795584335;keyid="1hHmE3fo1rg5Ig70wuFtJ5wBc7G-sUTgUJkxyPWFRps";alg="ed25519";nonce="lNe9HbqGsgYhCuE0Y4MlSA";tag="crawlcheck-page" |
| signature | sig1=:7itjQdAU7nk+DmOofhSByHBhgqMefssBQ2hy9mkxrTGMrBzBe9CzAefODM7FRe/aqYVJZsV5gjyGcfw89JVSBw==: |
| verified | yes — signature by key 1hHmE3fo1rg5Ig70… from https://crawlcheck.io/.well-known/http-message-signatures-directory (directory valid), valid for 3600 more s. Checked here exactly as a crawler would; redo it yourself: https://crawlcheck.io/api/tool/wba |
Findings · 2026-11-22 · By [VSNARY | Emmanuel Orta](/author) # Both our SDKs crashed on tool lists nested too deeply The same MCP tool list got a digest from our JavaScript SDK and a crash from our Python SDK. Both now stop at 512 levels with a named error. On 22 November 2026, CrawlCheck's Python SDK 1.16.3 crashed with an uncaught RecursionError on MCP tool lists nested 500 levels deep, while the JavaScript SDK 1.15.2 returned digests up to 2,957 levels, then crashed. Versions 1.16.4 and 1.15.3 replace recursion with a loop and stop at 512 levels, counted with the tools array as level 1, with the error TSD-DEPTH. Ordinary digests did not change: 3,000 test lists showed 0 differences. On this page - What a tool-list digest is, and where depth comes in - What the old SDKs did - Why two SDKs gave two answers - The fix: no recursion, one written bound - How the fix was checked - The specification now says the same - How to test any JSON canonicaliser for deep nesting - What to do if you use our SDKs - What this post does not claim On 22 November 2026, version 1.16.3 of our Python SDK raised an uncaught `RecursionError` on any [MCP tool](/glossary/mcp-tool) list nested 500 levels deep, while version 1.15.2 of our JavaScript SDK returned a digest for the same list up to 2,957 levels and then threw a `RangeError`. Two libraries that exist to give one answer gave two. Both are fixed in PyPI `crawlcheck` 1.16.4 and npm `@crawlcheck/sdk` 1.15.3, which stop at 512 levels with a named error instead of crashing. This post gives the numbers, the fix, how it was checked, and a test you can run on any JSON library. ## What a tool-list digest is, and where depth comes in # An [MCP server](/glossary/mcp-server) tells an [AI agent](/glossary/ai-agent) which tools it offers through a **tool list**: a JSON array where each tool has a name, a description and an input schema. A **digest** is a short fingerprint of that list, a hash, so an agent can pin the tools it approved and notice when they change. To hash JSON reliably you first rewrite it in one fixed form, with keys sorted and numbers written one way. The code that does this is a **canonicaliser**. The rules both our SDKs follow are the public specification [mcp-tool-set-digest](https://github.com/alexar76/mcp-tool-set-digest). It defines two digests: a **contract digest** over the parts a tool promises (name, description, input and output schema) and an **extras digest** over every other member. Our [SDKs](/sdk) compute both, and the [MCP lockfile](/spec/mcp-lockfile) stores them. Depth is how many arrays or objects sit inside one another. The specification counts the tools array as level 1, a tool as level 2, and anything a tool member holds as level 3 and below. A server can send whatever it likes, though, and the spec repository's issue tracker had listed four input cases its test vectors did not cover. Deep nesting was one of them. We ran all four against our own SDKs on 22 November. ## What the old SDKs did # We installed the released packages from PyPI and npm in a clean environment and fed each a tool list whose deepest array sat at a chosen level, then searched for the first level that failed. | Package | Runtime | Last level with a digest | First failure | What failed | | --- | --- | --- | --- | --- | | PyPI crawlcheck 1.16.3 | Python 3.13 | 499 | 500 | uncaught RecursionError | | npm @crawlcheck/sdk 1.15.2 | Node 22 | 2,957 | 2,958 | RangeError: call stack exceeded | | PyPI crawlcheck 1.16.4 | Python 3.13 | 512 | none | TSD-DEPTH from 513, tested to 100,000 | | npm @crawlcheck/sdk 1.15.3 | Node 22 | 512 | none | TSD-DEPTH from 513, tested to 100,000 | The JavaScript limit moved a little with where the deep value sat: 2,957 levels inside an input schema, 2,940 in a member outside the contract. That drift is the point. A limit set by how much call stack is left is not a rule anyone wrote down, so it changes with the runtime, the version and the code around it. ## Why two SDKs gave two answers # Both canonicalisers were **recursive**: to write an array, the function called itself for each element, so every level of nesting used one more frame of the program's call stack. Python stops a program at a fixed recursion limit, 1,000 frames by default, and our code used about two frames per level, which put the wall near level 500. Node has no frame count; it stops when the stack's memory runs out, which happened near level 2,950. Between those two numbers, the same tool list got a digest from one SDK and a crash from the other. An agent pinning tools in Python and a dashboard checking the same server in JavaScript would disagree about a list neither of them was wrong to read. And a crash is worse than a [refusal](/glossary/refusal): an uncaught exception in a tool check can take the check down with it, and a server can trigger it on purpose by sending one deep schema. ## The fix: no recursion, one written bound # Versions 1.16.4 and 1.15.3 rewrite the canonicaliser as a loop over an explicit list of work, so the program's stack no longer grows with the input. The depth limit is now a number in the code, the same in both languages: 512 levels, counted with the tools array as level 1. A value deeper than that gets the error code `TSD-DEPTH` on the digest that covers it, and only that digest. | Where the deep value sits | Contract digest | Extras digest | | --- | --- | --- | | Inside an input schema, level 512 | digest | unchanged | | Inside an input schema, level 513 or deeper | TSD-DEPTH | unchanged | | In a member outside the contract, level 513 or deeper | digest, same as without the member | TSD-DEPTH | Nothing is cut, skipped or repaired. A list that is too deep is reported as too deep; it is never silently shortened to something that hashes. That matches the rule from our earlier correction, when [both SDKs cut a tool list at 300 with no warning](/blog/our-sdks-cut-a-tool-list-at-300-with-no-warning): a digest must cover everything it claims to, or say it could not. ## How the fix was checked # Every check below ran on 22 November 2026 against the released packages, not a local build. | Check | Result | | --- | --- | | The specification's published test vectors, old and new, both languages | all pass | | Levels 511 and 512, both sides of the contract/extras split | digest, identical in Python and JavaScript | | Levels 513 and 100,000 | TSD-DEPTH on the covering digest, identical in both | | 3,000 generated tool lists, old vs new release, each language | 0 differences | | The same 3,000 lists, Python vs JavaScript | 0 differences | The 3,000 lists were random but seeded, with Unicode names, emoji, floats, empty schemas, output schemas and extra members, all within ordinary depth. Zero differences between old and new means no digest anyone had already pinned changes after an upgrade. The only behaviour that moved is the one that was broken. ## The specification now says the same # The editors of mcp-tool-set-digest adopted the same counting in their editors' draft of 22 November 2026. Its security considerations, section 12, set the bound at 512 with the tools array as level 1 and say a reader must accept every level up to it. Its error table, section 10, lists `TSD-DEPTH` for the digest that covers the deep value. The editors reported that their Python, JavaScript and Go references follow it. Vectors for the exact edges are in an open proposal on the repository; until they merge, the published vectors do not test depth, so the checks above did that directly. ## How to test any JSON canonicaliser for deep nesting # Any library that hashes, signs or compares JSON has the same exposure if it walks the value recursively. You can check yours in a few minutes. The rule is simple: past whatever depth it supports, it should return a named, bounded error, and it should never crash. Generate a value nested to depth N in a loop, call the library, and record what comes back for a range of depths around its limit and far past it: ``` def nested(depth): # build the value in a loop: a recursive builder hits the same wall v = [] for _ in range(depth - 1): v = [v] return v def probe(canonicalise, bounded_error): for n in (10, 511, 512, 513, 5_000, 100_000): try: canonicalise(nested(n)) print(n, "digest") except bounded_error as e: print(n, "refused:", e) # the answer you want past the bound except RecursionError: print(n, "CRASH: stack exhausted") # a crash is never an answer ``` Three things to watch for. First, build the input in code: Python's own `json.loads` raised a `RecursionError` on text 100,000 levels deep on Python 3.13, so a test that starts from JSON text may fail in the parser before it reaches the code you meant to test. Second, try depths far past the limit, not just one past it; a bound checked too late still crashes. Third, run the same depths through every language you ship. If the answers differ at any depth, two of your services can disagree about one input. In JavaScript the crash shows up as `RangeError: Maximum call stack size exceeded`. ## What to do if you use our SDKs # Upgrade both. Digests of ordinary tool lists are unchanged, so no pinned value or stored lockfile needs to be regenerated: ``` pip install --upgrade "crawlcheck>=1.16.4" npm install @crawlcheck/sdk@^1.15.3 ``` After the upgrade, treat `TSD-DEPTH` like any other digest error: the list could not be fingerprinted as sent, so do not approve it. ## What this post does not claim # We have no report of a server sending a deep tool list to a client using these SDKs; this came from testing inputs the vectors did not cover. The failure levels in the table are what we measured on Python 3.13 and Node 22; other runtime versions and stack settings will put the old wall somewhere else, which is the reason the bound is now written down. And 512 is a reader limit for these digests, not a claim about how deep a schema should be. CrawlCheck’s dataset when this page loaded: 598,666 sites measured. Written by [Emmanuel Orta](/author) · VSNARY I build CrawlCheck and write everything published here, from measurements the verification layer took. Where a post got something wrong, the correction stays in the post. [Every post, and where I got it wrong →](/author) · [Follow on LinkedIn →](https://www.linkedin.com/in/emmanuelorta) Share this finding: [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcrawlcheck.io%2Fblog%2Four-sdks-crashed-on-tool-lists-nested-too-deeply%3Futm_source%3Dlinkedin%26utm_medium%3Dsocial%26utm_campaign%3Dshare)[X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fcrawlcheck.io%2Fblog%2Four-sdks-crashed-on-tool-lists-nested-too-deeply%3Futm_source%3Dx%26utm_medium%3Dsocial%26utm_campaign%3Dshare&text=Both%20our%20SDKs%20crashed%20on%20tool%20lists%20nested%20too%20deeply)[Email](mailto:?subject=Both%20our%20SDKs%20crashed%20on%20tool%20lists%20nested%20too%20deeply&body=https%3A%2F%2Fcrawlcheck.io%2Fblog%2Four-sdks-crashed-on-tool-lists-nested-too-deeply)[Follow Emmanuel on LinkedIn](https://www.linkedin.com/in/emmanuelorta) ## Questions this post answers ### What did CrawlCheck fix in its SDKs on 22 November 2026? The tool-list digest in PyPI crawlcheck 1.16.3 crashed with an uncaught RecursionError on lists nested 500 levels deep, and npm @crawlcheck/sdk 1.15.2 crashed near 2,958 levels. Versions 1.16.4 and 1.15.3 stop at 512 levels with the error TSD-DEPTH instead of crashing. ### How are nesting levels counted? The tools array is level 1, each tool is level 2, and anything a tool member holds is level 3 and below. This is the counting in the mcp-tool-set-digest editors' draft of 22 November 2026. ### Do existing digests or lockfiles change after the upgrade? No. 3,000 generated tool lists gave the same digests on the old and new releases in both Python and JavaScript, and the same digests across the two languages. Only lists deeper than 512 levels behave differently. ### What happens when only an extra member is too deep? The contract digest is still computed, as if the member were not there, and the extras digest gets TSD-DEPTH. Each digest reports an error only for the values it covers. ### Why is a crash worse than an error here? An uncaught exception can stop the whole tool check, and a server can trigger it by sending one deeply nested schema. A named error lets the agent refuse the list and carry on. ### How can I test my own JSON library for this? Build values nested to several depths in a loop, including far past the limit, pass each to the library, and expect a digest or a named error at every depth. A stack overflow at any depth is the bug. ## Related findings [2026-11-13 Both our SDKs cut a tool list at 300 with no warning CrawlCheck's lockfile and both SDKs fingerprinted only the first 300 tools of an MCP server, unmarked. Fixed 11 November 2026.](/blog/our-sdks-cut-a-tool-list-at-300-with-no-warning)[2026-11-13 Claude-User uses two published address lists. We checked one CrawlCheck checked Claude-User against one of two Anthropic address lists and counted real fetches as failed. Fixed 13 November 20](/blog/claude-user-comes-from-two-published-address-lists-we-checked-one)[2026-09-30 Our extension read a page as 36.5% JavaScript. It was zero. Our extension called a server-rendered page 36.5% JavaScript; the true figure was zero. Two causes, both inflating, and what versi](/blog/the-page-our-extension-read-as-36-percent-javascript-was-zero) The main product Found this on your own site? **We fix it for $100.** Scan free to see where you stand. The fix is one site, every finding implemented and re-measured, with a sealed before and after. [Fix it all — $100](https://buy.stripe.com/4gM00j7OjawhdLEdyR2VG0v) [What it covers](/pricing#fix) · [scan first, it is free](/) Free browser extension Check this on any site you open, **without leaving the page.** CrawlCheck for Chrome grades every site you visit A–F and shows, from your own browser, what search engines and AI assistants are actually served. Free, no account. [Add to Chrome — free](https://chromewebstore.google.com/detail/plgjengobhbdmbgckiiaaflgiepdbcpi?utm_source=crawlcheck.io&utm_medium=post) [What it does](/extension) Write for the library Measured something yourself? **Submit an article.** Send your finding, the data and the method. A person reads every submission and replies by email; accepted articles are published under your name with a link to your study. Free to submit. Articles are accepted on merit; no one can pay to have one published. [Submit an article](/submit-finding#send) [How it works](/submit-finding) · a reply within about a week Spotted a mistake or a bug on this page? [Report an error](/report-error?k=article). Confirmed errors are fixed and logged on the [corrections page](/corrections). ## Comments Comments are read before they appear. Nothing is published automatically, and no account is needed. An AI agent with a published signing key can post without the queue: it signs the request and the signature is checked against its own domain ([how](/api/comment/signed)). Those appear at once, marked *verified*. Send for review Writing about this? [Facts, live figures and marks](/press) — every number on that page is dated and traceable to a scan. [All findings](/blog) · [The dataset](/data) · [How the dataset works](/policy) We read your site the way crawlers do, from our own network, and every report says exactly what was asked for and what came back. [Who runs this](/author) · [Press kit](/press) · [Videos](/videos) · [Evidence for disputes](/evidence) · [YouTube](https://www.youtube.com/@crawlcheck) · [hello@crawlcheck.io](mailto:hello@crawlcheck.io) #### How we measure, and our own machine files CrawlCheck reads every site as itself. Its crawler-identity tests send named user-agent strings from its own network, never from an operator’s published range, so a site that verifies crawlers can tell them apart; every report says so. Results reflect what an anonymous non-browser client receives. [What we collect and how to opt out](/policy) · [how every report is timestamped](/proof) · [who runs this](/author) · [press kit](/press) · [hello@crawlcheck.io](mailto:hello@crawlcheck.io). **Second vantage:** the [browser extension](/extension) measures what crawlers are served from your own address and after your JavaScript runs — the half this server cannot see. From 1.0.0 it sends the domain you ask about, on one button, and anonymous usage counts you can switch off; from 1.0.3 a footer switch turns off the hostname lookup for the grade on the icon; from 1.0.4 a share switch, on by default, sends a signed Two-vantages reading (status, size, words and a hash per identity; never page text); from 1.0.16 chips send the hostnames of search results and AI citations while the chips and grade switches are on; from 1.0.17 a readings switch, on by default, sends one signed page reading a day (numbers, the hostname and the page address with the query removed; never in incognito; at most 40 a day) and only while the share and grade switches are also on. Earlier versions send nothing. **Our own machine layer for the agentic web:** [llms.txt](/llms.txt) · [llms-full.txt](/llms-full.txt) · [agents.md](/agents.md) · [SKILL.md](/SKILL.md) · [entitymap.json](/entitymap.json) · [media kit](/.well-known/media-kit.json) · [MCP server card](/.well-known/mcp/server-card.json) · [API catalog](/.well-known/api-catalog) · [OpenAPI](/openapi.json) · [robots.txt](/robots.txt) · [sitemap.xml](/sitemap.xml) · [security.txt](/.well-known/security.txt) — every one named in robots.txt, which is exactly what we check for on yours. **Pages:** [IP ranges](/data/ip-ranges) · [Keys](/keys) · [Listing check](/listing-check) · [SDK](/sdk) · [Robots policies](/robots-policies) | **Registry:** [idealfencingcorp.com](/registry/idealfencingcorp.com) · [kinfolk.com](/registry/kinfolk.com) · [lucasbenjaminphotography.com](/registry/lucasbenjaminphotography.com) · [mrs.digital](/registry/mrs.digital) · [parkedgesweetshoppe.com](/registry/parkedgesweetshoppe.com) · [pulsetic.com](/registry/pulsetic.com) | **Blog:** [AI crawler IP ranges from 18 operator lists, in one file](/blog/ai-crawler-ip-ranges-from-18-operator-lists-in-one-file) [Contact](/contact) · [Partnerships](/partnerships) · [Terms of service](/terms) · [Refund policy](/refunds) · [Trust center](/trust) · [Subprocessors](/subprocessors) · [Changelog](/changelog) · [Report an error](/report-error)
Same body as a file: /blog/our-sdks-crashed-on-tool-lists-nested-too-deeply.md · as data: /feed.json · what we tell agents site-wide: /llms.txt, /agents.md. To see any other site this way, from your own browser, after its JavaScript runs: the browser extension.