Repository navigation
Fit search and scrape descriptions under Claude Code's 2,048-character cap, routing copy first - #436
Conversation
…r cap, routing copy first Claude Code truncates each tool description at 2,048 characters. On main the Alexandria copy started at character 1,530 of 4,943 (search) and 1,273 of 4,499 (scrape), so most of it was cut. The copy that changed agent behaviour in the AX runs now leads each description; mechanics move onto the parameters they describe. - firecrawl_search (4,943 -> 1,747): what it does, then the Alexandria lead (verticals, when a provider beats scraping, the sources opt-out), then pointers. Operators move to query, the maxAge note to scrapeOptions, domain filters to their own parameters. - firecrawl_scrape (4,499 -> 1,465): opens with 'Scrape one URL and return its content', keeps the scrape-first pointer, and points at the alexandria and requestId parameters, which now carry batching, contract reading, retries, error codes and provider terms. The duplicated Alexandria-mode paragraph is gone. - /v2/mcp-search scrape (about 3,350 -> under 1,500): same treatment. - Server instructions: the Alexandria routing paragraph moves ahead of the research and developer boilerplate so it sits inside the first 2,048 characters. - Tests: every tool on both surfaces stays at or under 2,048; the Alexandria lead, the sources opt-out and the scrape-first pointer are pinned; moved-text assertions now read the parameter descriptions. - Version 3.25.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
…s tests, document the instructions ordering trade-off Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
0 issues found across 5 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.
Re-trigger cubic
|
AX sim result (EXP-057): nothing broke. 11 provider-fit tester queries × Claude Code and Codex, prompt names Alexandria, main 55c1f99 vs this PR at 88d7e1d, 44 traces, digests verified on every trace.
Execution is identical per query in both lanes (the same ten execute; 🤖 Generated with Claude Code |
Scope keyless-unavailable tool pointers to authenticated sessions (stacked on #436)
Claude Code truncates each tool description at 2,048 characters. On
mainthe Alexandria copy starts at character 1,530 of 4,943 infirecrawl_searchand 1,273 of 4,499 infirecrawl_scrape, so most of it never reaches the model. This PR puts the copy that changed agent behaviour in the AX runs first, and moves mechanics onto the parameters they describe.firecrawl_searchfirecrawl_scrape/v2/mcp-searchfirecrawl_scrapeWhat stays in the first lines, and why
From the EXP-052/053/055/056 runs in firecrawl/agent-experience:
firecrawl_find_toolsis unchanged.sourcesopt-out. PR Alexandria routing copy: name the catalogue, keep search as the front door, make sources opt-out explicit #424's wording moved Codex from supplyingsourceson 291/291 searches to omitting it on roughly a third to half of calls. It stays on thesourcesparameter and now also sits in the search description's first lines.firecrawl_find_toolsstill says "Prefer normal firecrawl_search".Moved, not dropped
query: search operators.includeDomains/excludeDomains: their own descriptions.scrapeOptions: themaxAgenote and "never provider tools".alexandria: batch shape, version pinning, contract reading (required inputs,requiresOneOf,response.key, pagination), per-item errors,nextTool, access, and the terms flow.requestId: retry rules and the error codes.firecrawl_feedbackpointer stays in both the search and scrape descriptions, shortened.Tests
New
tests/mcp-description-budget.test.mjs(every full-surface tool ≤ 2,048; the Alexandria lead,sourcesopt-out and scrape-first pointer are present; scrape opens with the single-URL framing). The search-surface test checks every tool there ≤ 2,048. The smoke test checks the Alexandria paragraph, scrape-first rule andsourcesrule sit in the first 2,048 characters of the server instructions, and moved-text assertions now read the parameter descriptions. Suite 120/120. Version 3.25.4.An AX sim comparing this build against
mainon the 11 provider-fit tester queries, both lanes, is running; results will be posted here.🤖 Generated with Claude Code
Summary by cubic
Fits
firecrawl_searchandfirecrawl_scrapedescriptions under Claude Code's 2,048-character cap so the Alexandria routing copy reaches the model. The copy that changed agent behavior in the AX runs now leads each description; mechanics move onto the parameters they describe.firecrawl_searchdrops from 4,943 to 1,747 characters andfirecrawl_scrapefrom 4,499 to 1,465.sourcesopt-out) now sits in the search description's first lines; scrape opens with "Scrape one URL and return its content" and keeps the scrape-first pointer.maxAge, retry rules, error codes, batch shape, and provider terms move onto thequery,includeDomains,excludeDomains,scrapeOptions,alexandria, andrequestIdparameters.requestIdparameter instead.tests/helpers/description-budget.mjswith a shared cap constant andtests/mcp-description-budget.test.mjs; the search-surface and smoke tests pin every description under 2,048 characters and the routing copy inside the window. Suite passes 120/120; version bumped to 3.25.4.Written for commit 88d7e1d. Summary will update on new commits.