DEV Community

Sarvar Nadaf Subscriber for AWS Community Builders

Posted on AI-assisted

MCP Token Cost: I Cut My MCP Server From 15 Tools to 4

Includes full GitHub code and video demo

Here is a number that should bother you. GitHub's official MCP server loads about 55,000 tokens across 93 tool definitions before you ask it a single question. On a 200K context window that is more than a quarter of your budget, spent, before the agent does any work.

I did not believe it until I measured my own. So I built a small AWS MCP server the way most people build them, wired it into Kiro, and asked it one question: "where am I wasting money in this account?" It took seven tool calls to answer. Then I rebuilt the exact same server following AWS's own tool-design playbook. Same account, same question. Two tool calls. Fifteen tools became four. The tool schemas shrank by 88%.

This is the story of that rebuild, with the numbers on screen. It is a practical look at MCP token cost: where it comes from, how to measure it, and how to cut it. Not a hello-world server with an add_numbers tool. A read-only AWS cost-triage server that finds genuine wasted spend, shipped in two versions in the same repo.

The full code is on GitHub, both servers in one place so you can diff them:

GitHub logo simplynadaf / aws-lean-mcp

A read-only AWS cost-triage MCP server, shipped bloated (15 tools) and lean (4 tools), to demonstrate MCP tool design and cut token cost. Same account, same question: 7 tool calls down to 2.

🪶 aws-lean-mcp

The same AWS MCP server, built twice (bloated, 15 tools, and lean, 4 tools), so you can watch your AI agent get cheaper and smarter, live, in Kiro's /context view.

Kiro Crew AWS MCP Read Only License: MIT

Stars Forks Issues


⭐ If this helped you design better MCP tools, give it a star! It helps others find it.

Video Tutorial • The Problem • The Scoreboard • Getting Started • The 4 Fixes • Contributing


🎬 Video Tutorial

Watch the full rebuild, from a bloated 15-tool server that makes the agent flail, to a lean 4-tool server that answers in one clean call:

🎥 Watch on YouTube (link goes live with the episode)

In the video you'll see:

  • Why a typical MCP server quietly eats your context window before you ask a single question
  • The two failure modes AWS named: bloat and confusion
  • The bloated server making the agent take 7 tool calls to answer one question
  • The…

Who this is for

You have wired up a few MCP servers in Kiro, Claude Code, or Cursor. Maybe you built one. It worked in the demo, and then your agent started feeling slower, dumber, and more expensive as you added tools. You have seen the phrase "context bloat" and want to know if it is real, how bad it is, and what to do about it.

If you can read a Python function and a JSON file, you can follow this.

Table of contents

  1. The two ways an MCP server rots your agent
  2. The anti-pattern, on purpose (v1: 15 tools)
  3. The rebuild, fix by fix (v2: 4 tools)
  4. The scoreboard: what changed
  5. The honest part about the context meter
  6. Even AWS keeps its tool list tiny
  7. Try it yourself
  8. What the blog posts do not tell you

1. The two ways an MCP server rots your agent

AWS published the clearest breakdown of this in July 2026, in a post called MCP tool design: Practical approaches and tradeoffs. It names two failure modes, and they feed each other.

Bloat. Every tool definition loads into the context window on every call, whether the model uses it or not. Each tool schema runs 550 to 1,400 tokens, so fifty tools can mean 30,000 to 70,000 tokens of definitions before any work starts. A typical Claude Code session with five to ten MCP servers installed burns 50,000 to 67,000 tokens before you type your first prompt. You pay that tax on every turn.

Confusion. As the context fills up and your tools start looking alike (describe_volumes, describe_addresses, describe_snapshots, all thin, all similar), the model picks the wrong one, passes the wrong parameters, gets an empty result, and retries. Each retry adds more tokens. Bloat causes confusion, confusion causes more bloat. A spiral.

The root cause of both is the most common way people build MCP servers: take an API, wrap each endpoint as its own tool, ship 30 of them. It feels complete. It is a trap.


2. The anti-pattern, on purpose (v1: 15 tools)

To fix something you need something broken. So server_v1_bloated.py is built the way most servers really ship. Fifteen tools, each a thin 1:1 wrapper over one boto3 call.

@mcp.tool()
def describe_volumes() -> dict:
    """Describe Amazon EBS volumes in the account for the configured region.

    This tool calls the EC2 DescribeVolumes API and returns the complete
    response payload for every EBS volume it can see. Use this tool when you
    need to inspect block storage devices, their attachment state, size in
    GiB, volume type (gp2, gp3, io1, io2, st1, sc1, standard), encryption
    status, IOPS, throughput, the Availability Zone, creation timestamp, and
    the list of tags. A volume whose State field is 'available' is not
    attached to any instance and may be wasted spend...
    """
    return ec2.describe_volumes(Filters=_DEMO_FILTER)
Enter fullscreen mode Exit fullscreen mode

That docstring is trimmed here for print. In the repo it is longer, and that is the point. Notice three problems baked in:

  • The docstring is long, and it loads into context every single call, used or not.
  • It returns the full 40-field boto3 blob. That is response bloat: the agent gets fifteen fields it will never read.
  • To answer "where am I wasting money?" the agent has to know to call describe_volumes, then describe_addresses, then describe_snapshots, then check load balancers, then correlate all of it itself.

When I asked the bloated server my question in Kiro, it made seven waste-server tool calls: get_caller_identity, describe_volumes, describe_addresses, describe_snapshots, describe_instances, describe_nat_gateways, describe_load_balancers. It fished around, one call at a time, then assembled the answer. It got there. It was not pretty.


3. The rebuild, fix by fix (v2: 4 tools)

server_v2_lean.py has the exact same capability. Same read-only checks, same account, same findings. It applies AWS's ladder, and each rung is one clear fix.

Fix 1: outcome-level tools. Instead of fifteen thin wrappers, four tools that each complete a whole business action. The headline one:

@mcp.tool()
def find_waste(scope: Literal["account", "region", "service"] = "account",
               detail: bool = False) -> dict:
    """Find wasted AWS spend in one call. Returns each finding with 5 decision
    fields (id, kind, size/ip, why, region). Set detail=True for the full blob.
    """
Enter fullscreen mode Exit fullscreen mode

"Where am I wasting money?" is now one call, not seven. The tool runs all the checks internally and returns findings.

Fix 2: schema constraints. The scope parameter is a Literal["account", "region", "service"], not free text. The model cannot pass a garbage value, and it does not have to guess. AWS Prescriptive Guidance recommends keeping tools to around eight parameters or fewer. Every tool here has two.

Fix 3: lean responses. By default find_waste returns five decision-relevant fields per finding, not the full blob. If the agent genuinely needs everything, it passes detail=True. Anthropic's own guidance on code execution with MCP makes the same point: filter and shrink tool results before they reach the model, so the agent reads five rows instead of ten thousand.

if not detail:
    keep = ("id", "kind", "size_gib", "public_ip", "why", "region", "source_volume")
    findings = [{k: v for k, v in f.items() if k in keep} for f in findings]
Enter fullscreen mode Exit fullscreen mode

Fix 4: lazy taxonomy. Instead of baking every valid value into every tool description, there is a small describe_scope() tool the agent calls only when it needs to confirm inputs. Anthropic's Tool Search approach reports up to 85% token reduction by loading definitions only when relevant.

Fix 5: real errors. A bad scope returns "scope must be one of: account, region, service", not "no results". The model can recover from the first. The second sends it into a retry loop.

When I asked the lean server the same question, it called find_waste once, then estimate_savings to price it. Two calls. Clean.


4. The scoreboard: what changed

Same read-only agent. Same question. Same real AWS account in us-east-1. Every number here came from an actual run, filmed live.

Metric v1 bloated v2 lean Delta
Tools exposed 15 4 -73%
Tool-description size (chars, proxy for schema tokens) 7,898 897 -88%
Tool calls to answer the question 7 2 -71%
Real findings cited 3 IDs same 3 identical
Dollars from real Price List API yes yes identical
Attempted any mutation? no no read-only held

Both versions found the same wasted spend and cited the same resource IDs:

  • vol-0c85bd44ef6f9c19d, an unattached 8 GiB gp2 volume, about $0.80 a month.
  • snap-0e8e4ff717cead51e, an orphaned 8 GiB snapshot, about $0.40 a month.
  • eipalloc-000992c9956cfaaa5, an unassociated Elastic IP. The agent could not get a verified rate from the pricing tool, so it labeled the impact "not verified" rather than guessing. I built that honest refusal in on purpose.

One outcome-level tool did the work that took the bloated server seven separate guess-and-fish calls.

A quick note on what those schema chars cost in dollars. The 7,898 characters of v1 definitions are roughly 2,000 input tokens, loaded on every single turn. The lean 897 characters are about 225. On Claude Sonnet at $3 per million input tokens, that gap is tiny per call, a fraction of a cent. The reason it matters is that it multiplies: by every turn, every agent, every developer, and by the 90-plus tools a production setup runs instead of 15. A rounding error at demo scale becomes a line item at team scale.


5. The honest part about the context meter

Here is where I have to be straight with you, because most posts on this topic are not.

On my small demo, Kiro's /context tool budget only moved from 1.1% to 0.8%. True, but small. Fifteen tiny tools are still tiny against a 200K window, and the shared pricing server dominates the budget in both agents anyway.

So I am not going to put a dramatic "72% down to 8%" meter on screen and pretend it is my demo. The dramatic, filmed-live numbers are the ones in the table: 7 calls to 2, 15 tools to 4, 88% smaller schemas.

The big context figures (the 55,000-token GitHub server, the "72% of context consumed before the agent takes a single action") hold up, but they are industry data at production scale, clearly labeled as such. The point is the direction: a design principle that saves 0.3% on 15 tools saves 20% or more on the 90-plus tools a production setup runs. You do not want to discover that at scale.


6. Even AWS keeps its tool list tiny

The strongest proof is not mine. AWS's own managed AWS MCP Server exposes about eight tools for all of AWS, and in July 2026 it deprecated its call_aws tool in favor of a single run_script tool, shrinking the surface further. Its docs say, in plain words: "avoid referring to specific tool names in prompts, let your agent select the appropriate tool."

Lean, outcome-level surfaces plus on-demand context is not a hack I invented. It is how AWS builds its flagship server. This repo just lets you prove it on your own.


7. Try it yourself

Everything is in the repo, both servers side by side.

git clone https://github.com/simplynadaf/aws-lean-mcp.git
cd aws-lean-mcp
Enter fullscreen mode Exit fullscreen mode

Prove the difference without an agent at all:

python3 scripts/smoke_test.py
# 15 -> 4 tools, 897 vs 7898 description chars (88% fewer), real IDs from both servers
Enter fullscreen mode Exit fullscreen mode

Then wire each into Kiro and run the A/B with the same prompt in both. The agent JSONs and read-only IAM guidance are in the repo. It is read-only end to end: the servers only call Describe, Get, and List. There is no write action in the code.

If you want findings to triage, scripts/create-demo-resources.sh creates a few cheap, clearly tagged, intentionally wasteful resources, and the teardown script removes 100% of them.


8. What the blog posts do not tell you

Three things I only learned by building it.

The docstring is the schema. With FastMCP, your Python docstring and type hints become the tool definition the model sees. So you make the bloat-versus-lean call at the code level, every time you write a tool. A three-paragraph docstring is three paragraphs loaded on every call.

Splitting a tool can make the schema smaller, not bigger. It feels backwards. But moving valid values out of a fat description and into a separate describe_scope() tool that loads on demand shrinks what gets sent every turn. Fewer always-loaded tokens, at the cost of one extra round-trip when the info is genuinely needed.

Response bloat is half the problem and nobody talks about it. Everyone counts tool definitions. Almost nobody counts the fat JSON your tools return. Returning five fields by default instead of fifty is the cheapest win available, and it compounds on every call.

You did not need more MCP servers. You needed to build the one you have correctly.

Now I am curious about yours. Open the MCP server you use most and count the tools it exposes. Drop that one number in the comments: is it under 10, or did it creep past 30? And if you have ever measured the token cost before your first prompt, tell me what you saw. I will reply to every number.


Follow me for more on AWS architecture, DevOps, and AI Infrastructure:
Portfolio | LinkedIn | Dev.to | YouTube | Email | AWS Builder Center | X

Top comments (92)

Collapse
 
alexshev profile image
Alex Shev •

Outcome-level tools help only if their return contract remains inspectable. I would pair each aggregated tool with a compact provenance field for every finding—source check, region, and observation time—then make the detailed payload an explicit follow-up. That keeps the normal context footprint small while preserving a path to audit why the one-call answer is trustworthy.

Collapse
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

Yeah, agreed. And there's a split worth making here. The cheap stuff source check, region, when it was seen can ride along on every finding. It's tiny and it's enough to trust the answer at a glance. The heavy stuff raw tags, full ARNs, the actual API response shouldn't. That's what detail=True is for.

The trap is treating them as one thing. The second you say "make it auditable" and shove everything into the default return, you've quietly dragged the 40-field blob back in and the saving's gone. So I keep provenance light by default and the real proof on demand, for the one finding I'm about to touch. Going to work this into the next version. Good nudge.

Collapse
 
alexshev profile image
Alex Shev •

Exactly. detail=True should be an explicit escalation path, not a default payload in disguise. I’d add a CI guardrail for the default response schema and size, so a well-meaning new field can’t quietly turn the cheap path back into the 40-field blob.

Thread Thread
 
stefan_07d23f966225156b50 profile image
Stefan •

Alex, I'd include a large result set in that CI check too. Five fields per finding stays small until the account returns 2,000 findings. A bounded page with an explicit "more results" signal would keep the response manageable without making a partial scan look complete.

Thread Thread
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

yeah a ci check on the default return is exactly the right place for it. the thing that bit me isn't someone adding detail=True logic, it's someone appending "just one more useful field" to the default path over six months until it's quietly the 40-field blob again. so i'd assert two things in ci: the default key set is exactly the allowlist, and the per-finding char/token size stays under a cap. fails the build if either drifts. the schema toggle is easy to review, the slow creep isn't, so you pin it. are you running your tool schemas through ci already or is that a thing you'd be adding fresh?

Thread Thread
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

Stefan

good point, and that's a real hole in the current demo. my account returns 3 findings so i never felt it, but at 2,000 the lean response stops being lean, five fields times two thousand is its own blob. the fix is a bounded page plus an explicit "truncated, N more" signal so a partial scan never reads as a complete one, that last bit matters most for a cost tool because a silently-cut list makes the agent think it's seen everything and stop. putting a cap plus the truncation flag in the ci size check is the right call. adding it to the next pass.

Thread Thread
 
alexshev profile image
Alex Shev •

That is a useful addition. The response can make the boundary explicit with a cursor or next-page token plus returned and total counts, so a caller can distinguish a deliberately bounded page from a complete scan.

Thread Thread
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

Yes

Thread Thread
 
alexshev profile image
Alex Shev •

One edge case worth specifying is a changing dataset between pages: a cursor tied to a snapshot or stable sort order can prevent the caller from silently missing or repeating items. If the total is approximate, I would label it as such.

Collapse
 
stackmasteraliza profile image
Aliza Ali •

"Response bloat is half the problem" deserves its own post. On long sessions I'd expect trimming the 40-field boto3 blob to be the bigger win, because every bloated result stays in the transcript and gets re-read on every later turn. One nuance on the 55K figure: with prompt caching, static tool definitions get much cheaper in dollars after the first call, but they eat exactly as much context window. So 15 to 4 tools mostly buys back context and tool-selection accuracy, while trimming responses buys back both. Seven calls down to two for the same question is the number that really sells it.

Collapse
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

"response bloat is half the problem deserves its own post" is fair, i gave it one section when it probably earns its own piece, because you're right that it's the bigger win on long sessions. schema cost is paid once at load, but a fat result sits in the transcript and gets re-read on every later turn, so trimming the 40-field blob compounds in a way the schema cut doesn't. and your caching nuance is the one i had to be corrected on earlier in this thread too, caching makes those 55k of tool defs cheap in dollars but they still eat the exact same context window, so 15→4 mostly buys back context and tool-selection accuracy while trimming responses buys back both. that's the honest split. the 7-2 is the seller because it attacks the per-turn cost, not the one-time load. you clearly think about the transcript-replay cost, are you trimming historical tool results outof context after N turns, or keeping them full and just eating the re-read?

Collapse
 
stackmasteraliza profile image
Aliza Ali •

Honestly, I'd rather not eat the re-read. The pattern that makes most sense to me: keep the last few tool results verbatim, and swap older ones for a one-line summary plus an ID the agent can re-fetch if it needs the detail again. The transcript stays cheap, and the agent doesn't lose track of what it already checked. That would make a great follow-up post too!

Collapse
 
tokenlat profile image
TokenLat •

Cutting the tool surface from 15 to 4 is the right reflex — fewer tools means less schema junk in every prompt, and the 88% drop is real. Two hidden costs survive the cleanup, though:

1) detail=True pulls a 40-field blob into context even when the call only needs 3 fields. That's a routing decision, not a schema toggle — route those result-heavy turns to a smaller model and the save holds.

2) Tool definitions get re-sent every turn, so you pay for them N times unless the gateway caches them. Cache them and the "default" per-turn cost approaches zero.

The quiet leak is almost always repeated context, not first-turn schema size. Do you meter per-turn tool-context cost separately, or only the first-turn number?

Collapse
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

you're right and this is the honest gap in my table, i measured first-turn schema size, not the per-turn replay. tool defs ride at the front of every turn, so you pay them n times across a session unless the client caches the prefix, and with anthropic caching a hit is ~10% of base input so the per-turn cost basically collapses once it's warm. so the real number teams should watch is cached vs uncached per-turn, not the one-time load i put on screen. the routing idea is sharp too, detail=True turns are exactly the ones to send to a cheaper model since they're read-heavy and low-reasoning. i didn't meter per-turn separately, that's a fair hit. are you metering cached vs uncached turns in the gateway, or routing purely on result size?

Collapse
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

🚀 Want to see the lean MCP approach in action or explore the code?

🎥 Full YouTube Demo:

youtu.be/1EGeu4jCaR0?si=gb0DZ1SZdw...

💻 GitHub - Complete Source Code:

github.com/simplynadaf/aws-lean-mcp

If you're building MCP servers for AWS or AI agents, feel free to fork the repo, experiment with it, and share what you improve. 🙌

⭐ If you find the project useful, consider starring the repo!

Picked as gem
Collapse
 
whiteknightonhorse profile image
whiteknightonhorse •

The 55,000 tokens for 93 GitHub tools is a number more MCP READMEs should show. We hit the same wall with a catalog of well over a thousand tools and ended up with one free discovery tool that ranks candidates and returns only their schemas. Did the four-tool version get worse on questions outside cost triage, or did it still cover them?

Collapse
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

honest answer, my four tools are scoped to cost triage so outside that lane they don't pretend to cover it, i'd rather return nothing than a confident wrong answer. your discovery-tool approach is the right pattern for a thousand-plus catalog though, one free ranking tool that returns only candidate schemas is basically deferral done server-side, you never load the catalog, you load the two that matched. did the discovery step add a noticeable latency hit before the real call, or was the ranking cheap enough that it disappeared?

Collapse
 
whiteknightonhorse profile image
whiteknightonhorse •

Measured it just now. On the server side a discovery call takes about 40 to 65 ms, against about 30 ms for a plain health check, so the ranking itself costs tens of milliseconds. What the agent feels is the extra network round trip: from my laptop in Bangkok that is around 0.7 s, the same as any other request. It usually happens once per task, and the agent then calls the tool it picked directly.

Collapse
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

The GitHub server number is the one that should embarrass the whole ecosystem — 55,000 tokens of tool definitions before the first question, a quarter of a 200K window gone. Your 7-to-2 rebuild proves the cost isn't the model, it's the tool surface. One pushback: collapsing 15 tools into 4 concentrates capability — did any question get harder to answer because the one big tool now returns a haystack the agent has to sift through?

Collapse
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

honestly no, but only because i kept the response lean at the same time, which is the part that saves you from the haystack. collapsing 15 tools into find_waste would create exactly the problem you're describing if it returned everything, the agent gets one giant blob and has to sift it, you just moved the work. the thing that prevents it is the 5-field default, the agent gets a short decision-ready list, not the raw pile. so the two fixes are a pair, outcome-level tool and lean return, do one without the other and you're right, you've just hidden the mess inside the call instead of across seven calls.

Collapse
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

That's the pairing I missed — the tool collapse only works because the return got lean at the same time, so the haystack never reaches the agent. It reframes the fix as two halves, not one: if either half slips, a fat return or a fragmented tool surface, the cost comes straight back. Have you found a question where the 5-field default hides something the agent actually needed, or has the short list held up so far?

Collapse
 
lin7c profile image
xcl •

The response-bloat point in section 8 changes the usual calculation: even with a lean tool list, returning a full 40-field blob just moves the context cost from the schema into the result. One question on the detail=True escape hatch — what should decide that the extra fields are worth requesting instead of answering from the five default fields? That decision rule seems as important as the field list itself, because an agent that routinely escalates to detail=True would quietly give back most of the 88% saving.

Collapse
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

Great catch. You're right that detail=True is where the saving can leak back out, so the rule for when to pull it matters as much as the default field list.

The way I draw the line: the 5 default fields exist to answer "what should I do and where" (id, kind, size/ip, why, region). That's enough to decide and act. detail=True is for "prove it, I'm about to change something," not for routine reading. In practice the agent only escalates on two triggers:

  1. A human (or downstream step) explicitly asks for evidence (raw tags, timestamps, full ARNs, cost breakdown) before approving a destructive action.
  2. The 5 fields are genuinely ambiguous for that one finding, so you fetch detail for that id only, not for the whole result set.

The key is that detail=True is per-call on a narrowed scope, never the default path. A well-behaved agent reads the lean list, picks the one or two findings that matter, and only then asks for the blob on those, so you pay the full cost on 2 findings, not 40. The anti-pattern you're describing (routinely escalating) is really a prompt and discipline failure, and I'd treat it the same way I'd treat an agent that calls list-everything "just in case." Worth adding a line to the tool description saying detail=True is for verification before action, so the model doesn't reach for it by reflex.

Honestly this is a good argument for measuring it: log how often detail=True fires vs default calls. If the escalation rate creeps up, the field defaults are wrong, not the escape hatch.

Collapse
 
panthpatel profile image
Panth Patel •

The read-only part is what makes the merge safe. find_waste can run five checks behind one call because none of them change anything. On my ticket tracker I went the other way for agents: they get the same APIs the frontend uses, nothing more, so anything an agent does to the board is something a person could have done the same way. That is close to your v1 shape. Would you collapse a write surface like that too, or keep writes one tool per action?

Collapse
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

you've put your finger on the exact line i wouldn't cross. read-only is the only reason i felt safe collapsing five checks into one find_waste, nothing it does is reversible-sensitive, worst case it reads something it didn't need to. a write surface i'd keep one tool per action, and for the same reason your frontend-parity approach works: an outcome-level write tool hides what's actually about to change behind one friendly name, and that's precisely where you don't want the model guessing. your shape, agents get the same apis a person would and nothing more, is the safer default because the blast radius of a mistake is already a thing a human could've done and presumably can undo. so my honest rule is collapse reads for tokens, keep writes granular and explicit for safety, the token saving on writes isn't worth the loss of a clear confirmation surface. do you gate those write apis behind any human-in-the-loop step for the agent, or is frontend-parity the whole guardrail?

Collapse
 
panthpatel profile image
Panth Patel •

Collapse reads for tokens, keep writes explicit: that rule holds up. Parity isn't my whole guardrail. A token only narrows what its person can do, no MCP tool deletes a ticket, and an agent's work stops at Review until the owner moves it to Done. Would find_waste ever propose a fix, or stay report-only?

Collapse
 
eye_java_420f1faa10ae8b86 profile image
Nan •

Your rule is that an escalation rate that's too high means the defaults are wrong. The inverse failure is quieter: an escalation rate near zero doesn't prove the five fields are enough, it can just mean the agent never felt the gap.

The shape I keep hitting in unattended runs is a finding where id, kind, size, region and why are all present and consistent, but they don't disambiguate. Two resources look like the same waste pattern and only the tags or the observation window tell you which one is real. Nothing in the default payload looks missing, so the agent decides and acts, and the token meter looks excellent. The cost of that decision shows up on the account, not in the context window, and the two dashboards never sit next to each other.

So alongside the escalation rate I'd log the inverse event: every action taken without detail=True, with the finding id and the fields it was based on. Sampling a handful a week and reading them as if the agent had been wrong is the only way I know to tell "the defaults were sufficient" from "the defaults looked sufficient".

Collapse
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

this is the best pushback i've gotten on the detail=True rule and it exposes a blind spot in how i framed it. i said a high escalation rate means the defaults are wrong, but i never said the quiet half, a near-zero rate doesn't mean they're right, it can just mean the agent never felt the gap. your example is exactly the dangerous one, two findings where id/kind/size/region/why all look present and consistent but only the tags disambiguate which one is real waste. nothing looks missing, so it acts, and the cost lands on the bill not the context meter, and those two dashboards never sit next to each other like you said. logging the inverse event, every action taken without detail with the id and the fields it leaned on, then sampling a handful a week and reading them as if the agent had been wrong, is the only honest way to tell "sufficient" from "looked sufficient." i was only instrumenting the loud failure. this is going in the next version. are you sampling those blind by id or weighting toward the findings that led to an
actual action?

Collapse
 
ascendra_ventures_92c21f2 profile image
Ascendra Ventures •

The GitHub MCP figure is the number that should get attention: 55K tokens across 93 tools before the agent has done anything. Going from 15 tools to 4, and from 7 calls to 2 for the same task, shows that the cost was in the shape of the interface, not the model.

Oleksandr's framing of outcome level tools versus 1:1 API wrappers is the part I would repeat to any team building one of these. A wrapper mirrors how the backend is organised, while an outcome tool mirrors what the caller is trying to finish.

xcl's point about response bloat and a detail flag that defaults to off covers the other half, since a lean schema still burns tokens if every response returns everything. Stefan's bounded pages with a "truncated, N more" signal and Alex Shev's CI check on the default schema are good ways to keep it lean after the first release.

Did the honest context meter change which tools people asked you to keep?

Collapse
 
sarvar_04 profile image
Sarvar Nadaf AWS Community Builders •

good recap, and you pulled the right four threads out of it, outcome vs wrapper, response bloat, the ci check, and the bounded page. to your question, the honest meter didn't change which tools people wanted kept so much as which number they trusted. once i showed 1.1 → 0.8 instead of a fake 70%, the conversation moved off "how big is the drop" and onto the things that actually bite at scale, per-turn replay, partial-failure status, the detail=True leak. nobody asked me to drop a tool, but a few started asking whether 4 was even the right cut or whether find_waste should split by service for least-privilege, which is a better question than the one i started with. the honesty basically bought a better class of pushback, which is the whole reason i posted it.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.