The next big unlock for enterprise agents isn't a smarter model. It's better context.

Enterprise AI agents fail on context more often than on models. 2026 data, the token budget, tools for every layer, and what you can run locally.

November 28, 202616 min readJakub Rusinowski
Affiliate disclosure: Some links on this page are affiliate links — if you buy through them, LLM Configurator may earn a commission at no extra cost to you. As an Amazon Associate, LLM Configurator earns from qualifying purchases.

Anthropic changed one thing about how Claude Opus 4 saw its tools, and its accuracy on internal MCP evaluations went from 49% to 74%. The weights were identical. The only difference was what sat in the context window when the model made its choice.

That result is the clearest single argument I know for where enterprise agents are stuck. Most teams I meet at workshops are still waiting for the next model to fix their agent. The bigger lever, and the one they control, is the information the agent gets to see: which documents, which tools, which memories, which permissions, and in what order.

> Key takeaways > - Published before/after tests show large gains from changing only the context: tool selection 49% → 74% (Opus 4), complex tool parameters 72% → 90%, RAG retrieval failures 5.7% → 1.9%. > - A five-server MCP setup spends ~55K tokens on tool definitions before the agent reads your request. On a 32K local context window, that does not fit at all. > - Vendors converged on this in 2026: Fivetran, Neo4j, Microsoft and Starburst each announced a "context layer" product between September and November, most of it still in preview. > - Most layers of the context stack (parsing, indexing, embeddings, reranking, memory, MCP) run well on your own hardware. That is the part of enterprise AI you can actually own. > - Models still matter: Opus 4.5 without tool search beat Opus 4 with it. Better context is the cheaper lever, not the only one.

The evidence: same model, different context

The most useful data here comes from teams that changed the context and held the model fixed. Anthropic has published several of these tests.

Same model, better context Published before/after results where only the context changed. Claude Opus 4 · MCP tool selection: 49 → 74% accuracy (Tool Search Tool); Claude Opus 4.5 · MCP tool selection: 79.5 → 88.1% accuracy (Tool Search Tool); Complex tool parameters: 72 → 90% accuracy (Tool Use Examples); RAG · top-20 retrieval failures: 5.7 → 1.9% failed (lower is better) (Contextual retrieval + rerank). Vendor-reported results from Anthropic's engineering posts. Different evaluations; do not compare rows with each other. Same model, better contextPublished before/after results where only the context changedClaude Opus 4 · MCP tool selectionTool Search Tool49 → 74%accuracy · scale 0–100%Claude Opus 4.5 · MCP toolselectionTool Search Tool79.5 → 88.1%accuracy · scale 0–100%Complex tool parametersTool Use Examples72 → 90%accuracy · scale 0–100%RAG · top-20 retrieval failuresContextual retrieval + rerank5.7 → 1.9%failed (lower is better) · scale 0–7%Vendor-reported results from Anthropic's engineering posts. Different evaluations; do not compare rows with each other.Sources: Anthropic, Advanced tool use (24 Nov 2025); Anthropic, Contextual Retrieval (19 Sep 2024).
Same model, better context Published before/after results where only the context changed. Claude Opus 4 · MCP tool selection: 49 → 74% accuracy (Tool Search Tool); Claude Opus 4.5 · MCP tool selection: 79.5 → 88.1% accuracy (Tool Search Tool); Complex tool parameters: 72 → 90% accuracy (Tool Use Examples); RAG · top-20 retrieval failures: 5.7 → 1.9% failed (lower is better) (Contextual retrieval + rerank). Vendor-reported results from Anthropic's engineering posts. Different evaluations; do not compare rows with each other. Same model, better contextPublished before/after results where only thecontext changedClaude Opus 4 · MCP tool selectionTool Search Tool49 → 74%accuracy · scale 0–100%Claude Opus 4.5 · MCP tool selectionTool Search Tool79.5 → 88.1%accuracy · scale 0–100%Complex tool parametersTool Use Examples72 → 90%accuracy · scale 0–100%RAG · top-20 retrieval failuresContextual retrieval + rerank5.7 → 1.9%failed (lower is better) · scale 0–7%Vendor-reported results from Anthropic's engineeringposts. Different evaluations; do not compare rowswith each other.Sources: Anthropic, Advanced tool use (24 Nov 2025);Anthropic, Contextual Retrieval (19 Sep 2024).

In every one of these published tests the model stayed the same; only what it could see changed.

  • Tool search. Instead of loading every tool definition up front, the agent searches a catalogue and loads only the handful it needs. On Anthropic's internal MCP evaluations, Claude Opus 4 went from 49% to 74% and Opus 4.5 from 79.5% to 88.1%. Total context used before work began fell from about 77K tokens to about 8.7K (Anthropic's own totals).
  • Tool use examples. Adding worked examples of how to call a tool, not just its JSON schema, took accuracy on complex parameter handling from 72% to 90% in Anthropic's internal testing.
  • Programmatic tool calling. Letting the model write code that calls tools and returns only the result, instead of pouring every intermediate result into the window, cut average token use on complex research tasks from 43,588 to 27,297 (37%).
  • Contextual retrieval. Prepending a short, generated explanation to each chunk before indexing it, then combining embeddings with BM25 keyword search, cut the top-20 retrieval failure rate from 5.7% to 2.9%. Adding a reranker took it to 1.9%: 67% fewer failed retrievals, with the same generator model.

One more data point from the same company is worth knowing. When Anthropic analysed what made its multi-agent research system good on BrowseComp, token usage alone explained 80% of the variance in performance. Spreading a task across several sub-agents, each with its own clean context window, beat cramming everything into one.

All of these are vendor-reported, on vendor-chosen evaluations. They measure different things, so don't compare the rows with each other. But the direction is consistent, and nobody had to wait for a new model.

What changed in 2026: the industry caught up

The idea isn't new. What changed this year is that analysts, surveys and product launches all started saying the same thing.

  • MIT NANDA's 2025 "GenAI Divide" report, as reported by The Register, found 95% of enterprise organisations getting zero return from their AI efforts, and put it down to systems that cannot retain data, adapt or learn over time, not to the models.
  • A Redis survey of IT and AI infrastructure leaders found 73% agree that navigable context systems are becoming the line between experimental and production AI, and 94% call compounding system intelligence essential for production maturity while only 4% have achieved it. Redis sells context infrastructure and does not publish its sample size, so treat these as a signal, not a census.
  • Thoughtworks moved context engineering to "Adopt" on its Technology Radar in April.
  • Product launches. Fivetran announced a Context Layer in September, in limited public preview. Neo4j announced a Context Engine in October, in private preview. In November, Microsoft introduced Microsoft IQ (Work IQ, Fabric IQ, Foundry IQ and Web IQ, with more than 350 third-party connectors; some parts generally available, others in preview), and Starburst introduced Context Studio for its Enterprise Context Layer, in private preview.

When the largest platform vendors all rename their data products after the same idea in the same quarter, the idea has reached the budget line.

What "context" means for an agent

Prompt engineering was about wording one request. Context engineering is about everything the model sees at each step of an agent loop. Forrester's definition is a good one: designing, orchestrating and delivering structured, relevant and timely context to AI systems so their outputs are accurate, grounded and compliant.

In practice, six things compete for the same window:

  • Instructions: the system prompt, policies, house rules.
  • Tools: the definitions of everything the agent can call.
  • Retrieved knowledge: chunks from documents, tickets, wikis, databases.
  • Memory: what the agent learned about this user or task in earlier sessions.
  • State: the conversation so far, tool results, the plan.
  • Permissions: not text in the window, but they decide which of the above should be there at all.

Every one of these costs tokens, and every token you add makes the others a little harder for the model to use.

Six ways context breaks

FailureWhat you seeEvidenceFix
Context rotAnswers degrade as the window fills, well before the limitChroma tested 18 models and found reliability fell as input length grewRetrieve less, compact history, split work across sub-agents
Lost in the middleThe fact is in the prompt and the model still misses itAccuracy is highest when the relevant passage sits at the start or endRerank and put the best evidence first; cut the rest
Tool bloatWrong tool chosen; window half full before the task starts58 tools ≈ 55K tokens of definitionsLoad tools on demand; fewer, better-described tools
Stale contextConfident answers from last week's dataRedis: 69% of the most mature organisations still feed decisions with stale dataStore a timestamp with every chunk; re-index on change events
Ungoverned accessThe agent can read or do more than the user couldStacklok: security is the top obstacle to MCP adoption, named by 64% of software leadersCheck permissions at retrieval time with the caller's identity; log every retrieval

The common thread: each failure looks like the model being stupid, and none of them is fixed by a bigger model.

The token budget nobody draws

Here is the exercise I now run at the start of every agent workshop. Before anyone writes a prompt, we add up what the agent will carry into each call.

Where the context window goes before the agent reads your question Tool definitions for a five-server MCP setup, measured by Anthropic: GitHub 35 tools ~26K tokens, Slack 11 tools ~21K tokens, Sentry 5 tools ~3K tokens, Grafana 5 tools ~3K tokens, Splunk 2 tools ~2K tokens; total 58 tools ~55K tokens. 32K window (a common local default): does not fit, 23K over; 128K window: 43% used; 200K window: 28% used. Loading tools on demand (tool search): ~8.7K tokens before work begins, vs ~77K with everything loaded up front. Token counts measured with Claude's tokenizer; local tokenizers differ. Window sizes are illustrative. Where the context window goes before the agent reads yourquestionTool definitions for a five-server MCP setup, measured by Anthropic58 tools ≈ 55K tokens of definitionsGitHub 35 tools · ~26KSlack 11 tools · ~21KSentry 5 tools · ~3KGrafana 5 tools · ~3KSplunk 2 tools · ~2KThe same 55K in different context windows32K window (a common local default)does not fit: 23K over128K window43% used before the question200K window28% used before the questionLoading tools on demand (tool search): ~8.7K tokens before work begins, vs ~77K with everything loaded up front.Token counts measured with Claude's tokenizer; local tokenizers differ. Window sizes are illustrative.Source: Anthropic, Advanced tool use (24 Nov 2025). Window shares calculated from these figures.
Where the context window goes before the agent reads your question Tool definitions for a five-server MCP setup, measured by Anthropic: GitHub 35 tools ~26K tokens, Slack 11 tools ~21K tokens, Sentry 5 tools ~3K tokens, Grafana 5 tools ~3K tokens, Splunk 2 tools ~2K tokens; total 58 tools ~55K tokens. 32K window (a common local default): does not fit, 23K over; 128K window: 43% used; 200K window: 28% used. Loading tools on demand (tool search): ~8.7K tokens before work begins, vs ~77K with everything loaded up front. Token counts measured with Claude's tokenizer; local tokenizers differ. Window sizes are illustrative. Where the context window goesbefore the agent reads yourquestionTool definitions for a five-server MCP setup,measured by Anthropic58 tools ≈ 55K tokens of definitionsGitHub 35 tools · ~26KSlack 11 tools · ~21KSentry 5 tools · ~3KGrafana 5 tools · ~3KSplunk 2 tools · ~2KThe same 55K in different context windows32K window (a common local default)does not fit: 23K over128K window43% used before the question200K window28% used before the questionLoading tools on demand (tool search): ~8.7Ktokens before work begins, vs ~77K with everythingloaded up front.Token counts measured with Claude's tokenizer; localtokenizers differ. Window sizes are illustrative.Source: Anthropic, Advanced tool use (24 Nov 2025).Window shares calculated from these figures.

Tool definitions alone can fill a local model's window before the user has typed a word.

Anthropic measured a realistic setup: GitHub (35 tools, ~26K tokens), Slack (11 tools, ~21K), Sentry, Grafana and Splunk. That's 58 tools and about 55K tokens of definitions before the conversation starts. Adding Jira alone adds ~17K. The largest overhead Anthropic says it has seen was 134K tokens.

On a 200K hosted window, 55K is uncomfortable. On a local model it's often fatal. The KV cache that holds the context lives in the same VRAM as the weights and grows with every token, which is why our own can-i-run checks assume an 8K context by default and why many consumer setups stop at 32K. On a 32K window those five servers don't fit at all.

How much depends on the model's attention design. Llama 3.1 8B needs 4.29 GB of KV cache at 32K and 17.18 GB at 128K, on top of its weights. Newer sliding-window designs are far cheaper: Gemma 4 12B needs 2.65 GB at 128K. Either way, every token you waste on tool definitions is memory you can't spend on the task, which is why context discipline matters even more on your own hardware than in the cloud.

Try it with your own setup:

Context Budget Calculator: five MCP servers, three windows

GitHub, Slack, Sentry, Grafana and Splunk, with 55,000 tokens of tool definitions, plus a 1,500-token system prompt, retrieval, memory, history and room for the answer: 67,700 tokens before the question.

WindowShare usedFits?
32K206.6%No, over by 34,932
128K51.7%Yes
200K33.9%Yes

With tools loaded on demand (four per task), the same agent needs 16,200 tokens.

Approximate, measured by Anthropic with Claude's tokenizer (Nov 2025). Your model's tokenizer will differ.

Open the calculator with this setup →

The tool adds up instructions, tools, retrieved chunks, memory and history, shows what's left for reasoning and output, and uses our compute module to tell you whether the resulting context still fits next to your model on your GPU. Flip "load tools on demand" to see what tool search or skills would save.

A note on the numbers: Anthropic's token counts use Claude's tokenizer. Qwen, Llama and Gemma tokenizers count differently, so treat the presets as estimates and measure your own servers if the margin is tight.

The context stack, layer by layer

When vendors say "context layer", they mean some combination of seven jobs. You don't need all seven on day one, but it helps to know which one is failing.

The enterprise context stack Seven layers between your data and the model, and which ones you can run yourself. Layer 7 Governance: Who may see what; audit every retrieval and action. Examples: identity-aware retrieval, MCP gateways, audit logs. Self-host: partial. Layer 6 Access protocol: One standard way for agents to reach tools and data. Examples: MCP (2026-07-28), Agent Skills, tool search. Self-host: yes. Layer 5 Memory: What the agent learned in earlier sessions. Examples: Mem0, Zep / Graphiti, Letta. Self-host: yes. Layer 4 Semantics & graph: Business meaning: entities, metrics, relationships. Examples: Neo4j, GraphRAG, LightRAG. Self-host: yes. Layer 3 Retrieval: Find the right chunks: embeddings + BM25 + rerank. Examples: Qwen3-Embedding, EmbeddingGemma, Qwen3-Reranker. Self-host: yes. Layer 2 Index & store: Vectors, keywords and metadata, kept fresh. Examples: Qdrant, pgvector, Chroma. Self-host: yes. Layer 1 Ingest & parse: Turn PDFs, tickets and tables into clean text. Examples: Docling, Unstructured, Apache Tika. Self-host: yes. Managed platforms: Microsoft IQ, Starburst, Neo4j Context Engine, Fivetran Context Layer. Example tools only, not a ranking. 'Self-host' means an open-licence or self-hostable option exists. The enterprise context stackSeven layers between your data and the model, and which ones you can run yourself7GovernanceSelf-host: partialWho may see what; audit every retrieval and actionidentity-aware retrieval · MCP gateways · audit logs6Access protocolSelf-host: yesOne standard way for agents to reach tools and dataMCP (2026-07-28) · Agent Skills · tool search5MemorySelf-host: yesWhat the agent learned in earlier sessionsMem0 · Zep / Graphiti · Letta4Semantics & graphSelf-host: yesBusiness meaning: entities, metrics, relationshipsNeo4j · GraphRAG · LightRAG3RetrievalSelf-host: yesFind the right chunks: embeddings + BM25 + rerankQwen3-Embedding · EmbeddingGemma · Qwen3-Reranker2Index & storeSelf-host: yesVectors, keywords and metadata, kept freshQdrant · pgvector · Chroma1Ingest & parseSelf-host: yesTurn PDFs, tickets and tables into clean textDocling · Unstructured · Apache Tika↑ toward the agentManaged platforms thatbundle several layers• Microsoft IQ• Starburst• Neo4j Context Engine• Fivetran Context Layer↓ toward your dataExample tools only, not a ranking. 'Self-host' means an open-licence or self-hostable option exists.Managed 'context layer' platforms announced Sep–Nov 2026, several still in preview, bundle several layers; see the toolstable in the post.
The enterprise context stack Seven layers between your data and the model, and which ones you can run yourself. Layer 7 Governance: Who may see what; audit every retrieval and action. Examples: identity-aware retrieval, MCP gateways, audit logs. Self-host: partial. Layer 6 Access protocol: One standard way for agents to reach tools and data. Examples: MCP (2026-07-28), Agent Skills, tool search. Self-host: yes. Layer 5 Memory: What the agent learned in earlier sessions. Examples: Mem0, Zep / Graphiti, Letta. Self-host: yes. Layer 4 Semantics & graph: Business meaning: entities, metrics, relationships. Examples: Neo4j, GraphRAG, LightRAG. Self-host: yes. Layer 3 Retrieval: Find the right chunks: embeddings + BM25 + rerank. Examples: Qwen3-Embedding, EmbeddingGemma, Qwen3-Reranker. Self-host: yes. Layer 2 Index & store: Vectors, keywords and metadata, kept fresh. Examples: Qdrant, pgvector, Chroma. Self-host: yes. Layer 1 Ingest & parse: Turn PDFs, tickets and tables into clean text. Examples: Docling, Unstructured, Apache Tika. Self-host: yes. Managed platforms: Microsoft IQ, Starburst, Neo4j Context Engine, Fivetran Context Layer. Example tools only, not a ranking. 'Self-host' means an open-licence or self-hostable option exists. The enterprise context stackSeven layers between your data and the model,and which ones you can run yourself7GovernanceSelf-host: partialWho may see what; audit every retrievaland actionidentity-aware retrieval · MCP gateways· audit logs6Access protocolSelf-host: yesOne standard way for agents to reachtools and dataMCP (2026-07-28) · Agent Skills · toolsearch5MemorySelf-host: yesWhat the agent learned in earliersessionsMem0 · Zep / Graphiti · Letta4Semantics & graphSelf-host: yesBusiness meaning: entities, metrics,relationshipsNeo4j · GraphRAG · LightRAG3RetrievalSelf-host: yesFind the right chunks: embeddings + BM25+ rerankQwen3-Embedding · EmbeddingGemma ·Qwen3-Reranker2Index & storeSelf-host: yesVectors, keywords and metadata, keptfreshQdrant · pgvector · Chroma1Ingest & parseSelf-host: yesTurn PDFs, tickets and tables into cleantextDocling · Unstructured · Apache TikaManaged platforms that bundle several layers:Microsoft IQ, Starburst, Neo4j Context Engine,Fivetran Context LayerExample tools only, not a ranking. 'Self-host' meansan open-licence or self-hostable option exists.Managed 'context layer' platforms announced Sep–Nov2026, several still in preview, bundle severallayers; see the tools table in the post.

Every layer below the managed platforms has an open-licence or self-hostable option.

LayerJobSelf-hostable examplesManaged examples
1. Ingest & parseTurn PDFs, tickets and tables into clean textDocling, Unstructured (library), Apache TikaMost platforms bundle this
2. Index & storeVectors, keywords and metadata, kept freshQdrant, pgvector, ChromaManaged vector DBs
3. RetrievalEmbed, search (dense + BM25), rerankQwen3-Embedding, Qwen3-Reranker, EmbeddingGemma, BGE-M3Hosted embedding APIs
4. Semantics & graphEntities, metrics, relationships, business definitionsNeo4j, Microsoft GraphRAG, LightRAGNeo4j Context Engine, Fabric IQ
5. MemoryFacts learned across sessions, with timeMem0, Zep / Graphiti, LettaThe same vendors' cloud tiers
6. Access protocolOne way to reach tools and dataMCP (spec 2026-07-28), Agent Skills, tool searchEvery major agent platform
7. GovernanceIdentity-aware access, audit, freshness checksMCP gateways, row-level security in your DBMicrosoft IQ (permission-aware retrieval, MCP policies)

Two standards hold the middle of this together:

  • MCP is now the default way agents reach tools and data. Its 2026-07-28 spec made the protocol stateless, so any request can hit any server behind a plain load balancer, and Anthropic reported more than 400 million monthly SDK downloads in July 2026.
  • Agent Skills handle procedural knowledge with progressive disclosure: only a skill's name and description sit in the window until the task needs it. When Anthropic donated the standard to the Agentic AI Foundation in October, more than 70 platforms supported it, with 1 million skills published and nearly 280 million installs.

A small example from this site: the LLMConfigurator MCP server answers "does this model fit this GPU?" with a deterministic calculation from our compute module instead of letting the model guess at VRAM. That's context engineering in miniature: replace a fuzzy thing the model might hallucinate with a precise thing it can look up. See how to connect the MCP server.

The local angle: the context layer is the part you can own

Open-weight models keep getting closer to the frontier, and they are interchangeable in a way your context isn't. Your documents, tickets, definitions, permissions and memories are the asset. They're also the part with the most regulatory risk.

The good news for anyone who cares about sovereignty: almost the whole stack runs on modest hardware.

  • Embedding and reranking models are small. Qwen3-Embedding and Qwen3-Reranker come in 0.6B, 4B and 8B sizes under Apache-2.0; EmbeddingGemma has 300M parameters.
  • Vector stores and parsers are ordinary server software. Qdrant, pgvector, Docling and Tika run in containers next to the rest of your stack.
  • Local hosts speak MCP. LM Studio has been an MCP host since version 0.3.17, and Open WebUI has connected to MCP servers natively (over Streamable HTTP) since version 0.6.31.

One caution that gets lost in sovereignty debates: if you retrieve locally but generate with a hosted model, the retrieved chunks still leave the building. Local retrieval reduces how much you send, because you send only what the task needs, but it doesn't make a hosted call private. For the most sensitive data, run the whole loop, model included, on your own hardware. For everything else, a hybrid is reasonable: local parsing, indexing, retrieval and permission checks, then the minimum necessary context to whichever model does the reasoning.

If you're sizing a box for this, the retrieval side is light; the generator model and its context window are what decide the GPU. By our compute module, Qwen3.8 27B at Q4_K_M with a 128K context needs 26.3 GB, fits 32 GB, so a single 32 GB card is enough:

NVIDIA GeForce RTX 5090 32GB
32 GB VRAM · 575 W board power
2026 prices are volatile — check the current listing.

And if you want to test a long-context setup before buying, rent a GPU for an afternoon:

Rent GPUs on RunPod → Rent GPUs on Vast.ai →

This page contains affiliate links.

For the deployment side, see our sovereign AI deployment guide and the step-by-step local RAG guide.

A seven-step context checklist

  • Draw the budget first. Add up instructions, tools, retrieval, memory and history before writing a prompt. Reserve room for the answer.
  • Load tools on demand. Tool search, skills or a router. Fewer tools in the window, each with a clear description and one worked example.
  • Retrieve with two methods, then rerank. Dense embeddings plus BM25, a reranker on top, and a short contextual header on every chunk.
  • Put the best evidence first and cut the rest. Ten mediocre chunks are worse than three good ones.
  • Timestamp everything. Every chunk and memory carries "as of". Re-index on change events, not on a weekly cron.
  • Enforce permissions at retrieval time. The agent queries with the user's identity, and every retrieval is logged. Never filter after the model has seen the data.
  • Debug the context, not just the model. When an agent fails, log exactly what was in its window. Most of the time the answer is right there.

Where this argument is weaker

I'd be overselling it if I stopped there.

  • Models still matter. In the same Anthropic test, Opus 4.5 without tool search (79.5%) beat Opus 4 with it (74%). A better model and better context stack; you want both.
  • Most of the evidence is vendor-reported. Anthropic's numbers come from internal evaluations. Redis, Stacklok and the context-layer vendors sell the thing they surveyed. All of it points the same way, but none of it is independent replication.
  • Context layers cost something. Every retrieval, rerank and tool search adds latency and moving parts. If your knowledge base is under about 200,000 tokens (about 500 pages), Anthropic's own advice is to skip RAG and put it all in the prompt with caching.
  • Governance is the slow part. Stacklok's December 2025 survey of software leaders found 45% of their organisations running MCP servers in limited or broad production, and security was the top obstacle, named by 64%. Connecting agents to data is easy; deciding who may see what is the real project.

Frequently asked questions

What is context engineering?

Context engineering is the practice of deciding what an AI agent sees at each step: instructions, tool definitions, retrieved documents, memory, conversation state and the permissions that govern them. Prompt engineering words one request; context engineering designs the whole information environment the agent works in.

Is context engineering just RAG with a new name?

No. Retrieval is one layer. Context engineering also covers which tools are loaded, how memory is stored and expired, how history is compacted, how work is split across sub-agents, and how permissions decide what may enter the window at all.

Do bigger context windows make context engineering unnecessary?

No. Chroma's tests on 18 models found reliability falls as input grows, well before the stated limit, and models use information at the start and end of a prompt better than the middle. A bigger window gives you more room to make mistakes. Below about 200,000 tokens of knowledge, putting everything in a cached prompt can still be the simplest option.

How many tokens do MCP tool definitions use?

Anthropic measured about 55K tokens for 58 tools across GitHub, Slack, Sentry, Grafana and Splunk, and about 17K for Jira alone, using Claude's tokenizer. Other tokenizers differ. Loading tools on demand with tool search brought Anthropic's example from about 77K to about 8.7K tokens before work began.

Can I build a context layer entirely with local, open-weight tools?

Yes. Parsing (Docling, Tika), storage (Qdrant, pgvector), embeddings and reranking (Qwen3-Embedding, Qwen3-Reranker, EmbeddingGemma), memory (Mem0, Letta) and MCP all run on your own hardware. If you then send the retrieved context to a hosted model, that context leaves your network, so keep the generator local for the most sensitive data.

Do I need a managed platform like Microsoft IQ?

Not to start. Managed platforms bundle connectors, a knowledge graph and identity-aware access, which helps if you already live in that cloud. A team with one well-defined use case can get far with a vector store, a reranker, a handful of MCP servers and strict permission checks.

What should I measure to know if my context is the problem?

Log the full context of every failed agent run and review it. Track retrieval failure rate (did the right chunk make the top results?), tokens spent on tools versus task, the age of the data used, and how often the agent picked the wrong tool. If those look bad, a model upgrade won't fix them.

Sources (22)