- Inspect MCP servers and agents in the KAgent UI
- Deploy a declarative LLM-only agent and observe its behavior
- Update the agent to attach AWS Pricing MCP server tools and compare results
- Run simple and complex pricing queries through the agent
Overview — What you’ll learn
- How to register an agent that relies only on the LLM (no tools)
- How to attach MCP server tools to the agent so it can call AWS Pricing APIs
- How the agent invokes tools, receives structured pricing JSON, and produces human-friendly responses
- Operational checks and debugging patterns for agents + MCP servers
Access the KAgent UI
- Open the KAgent UI (top-right in your environment).
- Skip the initial wizard if prompted and go to the main view.
Inspect running agents
- In the KAgent UI, go to View → Agents to see registered agents.
- At the start of this demo there are no agents registered.
Deploy an LLM-only agent (no tools)
A declarative agent manifest is provided at/root/no_tool_aws-price-checker.yaml. This agent is named aws-price-check and declares no tools, so it will rely entirely on the LLM (no live pricing calls).
Example agent manifest (LLM-only)
Agents without declared tools rely entirely on the LLM and cannot fetch live pricing. To obtain live pricing you must attach MCP server tools to the agent.
- Ask the LLM-only agent about the on-demand price for
g4dn.16xlargeon Linux with shared tenancy inus-east-1andap-southeast-2. - Because the agent has no tool access, results will either be an LLM-derived estimate or a refusal like “Sorry, I do not have that pricing information available.”
Attach the AWS Pricing MCP server tools to the agent
Next, configure the agent to call the MCP server tools that expose the AWS Pricing List API. In the KAgent UI:- View → MCP servers → select the AWS Pricing MCP server (e.g.
awslabs-aws-pricing-mcp-server-latest) - View → Tools to inspect available functions such as
get_pricing,get_pricing_attribute_values,get_pricing_service_codes,generate_cost_report, etc.

| Tool name | Purpose / Example usage |
|---|---|
get_pricing_service_codes | Enumerate available pricing service codes (e.g., AmazonEC2). |
get_pricing_service_attributes | Retrieve service attributes (e.g., instanceType, operatingSystem). |
get_pricing_attribute_values | Fetch all values for an attribute (e.g., all EC2 instance families). |
get_pricing | Query price terms and priceDimensions for a specific product filter. |
get_price_list_urls | Get Price List API URLs for a service and region. |
generate_cost_report | Produce aggregated cost reports across resources or time windows. |
Run the same pricing query with tools attached
Re-run the earlier query forg4dn.16xlarge (Linux, shared tenancy) in us-east-1 and ap-southeast-2. With tools attached:
How the call flow works
- The agent invokes an MCP server tool such as
get_pricingwith filters forregion,operatingSystem,instanceType, andtenancy. - The MCP server calls the AWS Pricing List API and returns structured JSON to the agent.
- The agent’s LLM processes the JSON and formats a human-readable response (tables, lists, or cost recommendations).
- Using the returned pricing data the agent can provide accurate results, for example:
- us-east-1 on-demand price for Linux
g4dn.16xlarge: approximately $4.35/hour - ap-southeast-2 on-demand price for Linux
g4dn.16xlarge: approximately $5.65/hour
- us-east-1 on-demand price for Linux

Run more complex queries
You can request multi-dimensional comparisons in a single user prompt. The agent will orchestrate multiple tool calls (one per region/offer/purchase option), aggregate results, and return a consolidated table or list. Example complex query:- Compare on-demand and 1-year reserved pricing for an
m7ginstance acrossap-southeast-2(Sydney) andus-east-1(N. Virginia). The agent will:- Call
get_price_list_urlsandget_pricingfor each region and purchase option - Parse
pricePerUnitfrom the returned JSON - Compute and present the comparisons in a table
- Call

Operational notes and best practices
Table: Troubleshooting checklist| Symptom | Check |
|---|---|
| Agent does not return pricing | Verify agent pod is Running; check agent YAML includes tools → mcpServer → toolNames. |
| Tools not listed in UI | Verify MCP server is Running and healthy; open View → Tools for that MCP server. |
| Tool calls time out or fail | Check network connectivity, MCP server logs, and required AWS credentials/permissions. |
| Slow responses for complex queries | Reduce parallel calls or cache repeated price list results; consider pre-generating cost reports with generate_cost_report. |
- Team workflow: Expose centralized pricing tools via an MCP server and create a pricing agent teams can call from CI/CD or chat to get cost estimates during planning or deployment.
- Debugging: Review logs for the MCP server and agent pods (
kubectl logs) to troubleshoot tool invocation failures. - Performance: Tool calls depend on MCP server latency, AWS Pricing API response time, and the number of distinct queries; batch or cache where appropriate.
Ensure the MCP server has the necessary AWS credentials and IAM permissions to call the AWS Pricing API. Without proper credentials, tool calls will fail even if the MCP server pod is Running.
References and further reading
- Kubernetes Basics
- AWS Pricing API / Pricing List API
- KAgent documentation (see your platform’s KAgent docs for agent manifest details and modelConfig options)