SShortSingh.
Back to feed

Claude Code's tool search defers 40,000+ tokens of MCP definitions by default

0
·27 views

A developer tested Claude Code v2.1.263 and found that its default 'tool search' feature withholds 88 MCP tool definitions from the initial prompt, cutting first-request input tokens from roughly 61,000 to around 21,000. The feature, enabled by default via the ENABLE_TOOL_SEARCH environment variable, loads only tool names and server instructions at session start, pulling full schemas only when Claude explicitly requests a tool. This explains why users who added multiple MCP servers in recent months noticed little to no context window shrinkage compared to earlier behavior. However, the auto:5 threshold mode — which defers tools only after they exceed 5% of the context window — loaded all 88 definitions anyway in testing, resulting in even more tokens than the fully upfront setting. The feature requires a Claude 4.5-generation model or later and is automatically disabled when a non-Anthropic base URL is detected, as most proxies cannot handle the tool_reference blocks it depends on.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Small Offices Have Until January 12, 2027 to Retire Windows Server 2016 Roles

Windows Server 2016 reaches the end of extended support on January 12, 2027, prompting small offices to plan replacements. The article argues that a single server typically runs three or four roles, each with its own timeline, rather than being one item to replace. It recommends listing each role with a deadline and a cost of delay, since the slowest role, often a legacy application, tends to dictate the overall schedule. Hardware quotes alone rarely drive progress, because the real constraints lie in software dependencies. Written in late November, the piece notes that vendor responses and migration work could push the practical start into the current month rather than after the holidays.

0
ProgrammingDEV Community ·

Excel's 65,536-row limit silently dropped nearly 16,000 COVID test results

In October 2020, Public Health England lost close to 16,000 positive COVID-19 test results during a surge in case numbers. An automated pipeline converted incoming CSV files into legacy .xls spreadsheets, which cannot hold more than 65,536 rows. Records beyond that limit were cut off without raising any error, so the affected people were never notified or traced. The incident shows why data pipelines should validate boundaries and fail loudly instead of depending on outdated file formats.

0
ProgrammingDEV Community ·

How Google Translate Turns Sentences Into Numbers to Cross 249 Languages

Google Translate does not understand language the way people do; instead, it converts input text into numerical patterns and predicts likely translations by matching them against vast collections of human-made translations. Its neural system, which replaced an older phrase-based method in 2016 and cut errors sharply, can even translate between language pairs it was never directly trained on, creating its own internal intermediate representation. For unfamiliar words, a subword technique called WordPiece splits them into recognizable fragments such as "un" and "happiness". The article presents Google Translate as highly useful for everyday tasks while noting that it still makes errors that users should check.

0
ProgrammingDEV Community ·

Parkinson's Law: Why Work Stretches to Fill the Time Allotted

This article launches a series on the laws of software engineering, framing them as natural tendencies rather than strict rules. It explains Parkinson's Law, coined by British historian C. Northcote Parkinson in his 1957 satirical book, which holds that work expands to fill the time available. The author notes that tasks given generous deadlines often get needlessly complicated, and that bureaucracies grow regardless of actual workload. Related ideas such as the Law of Triviality and the tendency for budgets to match available funds are also described. The piece argues that such over-complication compounds over time, increasing maintenance costs, and suggests countermeasures like artificial time constraints, clear definitions of done, and public accountability.