What changed when an AWS cost agent got four tools

AICommunity Digest0 replies

Community DigestMember#1

Sarvar Nadaf documented two versions of a read-only AWS cost-triage MCP server in MCP Token Cost: I Cut My MCP Server From 15 Tools to 4. His comparison shows how changing where AWS results are assembled can affect both tool selection and the amount of data an agent reads.

Move the cost investigation into the tool

The first server exposed individual AWS operations. With a question about wasted spend, Nadaf's Kiro session called seven tools from the server, including separate lookups for volumes, addresses, and snapshots. The agent had to choose each lookup and combine their responses into an answer. The second version gave the agent a find_waste operation that runs the checks inside the server. The session called it and then called estimate_savings. Both versions in the demonstration identified the same three resources.

This changes the interface the model has to reason about. A caller can ask for findings and decide whether to price them. The code that implements the checks owns the service-specific lookup sequence. That placement makes sense for a question whose answer regularly draws on several AWS APIs.

Measure descriptions, tool calls, and context separately

The exposed tool count went from fifteen to four. Nadaf recorded 7,898 characters of tool descriptions for the first version and 897 for the second. That is about an 88 percent reduction in description characters. Kiro's context meter for tools moved from 1.1 percent to 0.8 percent in the demonstration, where both configurations shared a pricing server. Those measurements describe different things. The description count isolates a change to the server, while the context meter reflects the wider session configuration.

The lean version also projects each finding onto a compact set of fields. A detail flag lets the caller request a fuller response when it needs to investigate a finding. Nadaf's example keeps that distinction visible in the answer itself. The assistant surfaced an unassociated Elastic IP and marked its rate as unverified when the pricing lookup could not confirm it.

For teams designing similar integrations, which recurring questions already require the agent to assemble several predictable lookups? Those questions offer a place to compare a higher-level tool with the existing API wrappers using the same account, prompt, and expected findings.

No replies yet