Skip to main content
Glama
Arshu200

AWS Pricing MCP Server

by Arshu200

get_pricing

Retrieve AWS service pricing from the Price List API with filters to support cost optimization, regional comparisons, and budget planning.

Instructions

Get detailed pricing information from AWS Price List API with optional filters.

Service codes for API often differ from web URLs.
(e.g., use "AmazonES" for OpenSearch, not "AmazonOpenSearchService").
List of service codes can be found with `curl 'https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/index.json' | jq -r '.offers| .[] | .offerCode'`
IMPORTANT GUIDELINES:
- When retrieving foundation model pricing, always use the latest models for comparison
- For database compatibility with services, only include confirmed supported databases
- Providing less information is better than giving incorrect information

**TOOL PURPOSE:**
Retrieve AWS pricing data for various analysis needs: cost optimization, regional comparisons, compliance reporting, budget planning, or general pricing research.

**YOUR APPROACH:**
Follow a systematic discovery workflow to ensure accurate, complete results regardless of your specific use case.

**MANDATORY WORKFLOW - ALWAYS FOLLOW:**

**Step 1: Build Precise Filters**
```python
# FOR COST OPTIMIZATION: Create matrix of ALL minimum qualifying combinations
filters = {
   "filters": [
       {"Field": "memory", "Value": "8 GiB", "Type": "TERM_MATCH"},
       {"Field": "instanceType", "Value": "m5.large", "Type": "TERM_MATCH"}
   ]
}
```

**Step 2: Execute Query**
```python
pricing = get_pricing('AmazonEC2', 'us-east-1', filters)
```

**COMMON USE CASES:**

**Cost Optimization (CRITICAL):**
- Build complete cross-product matrix of ALL qualifying attribute combinations
- Test every combination systematically: example: (min_memory × qualifying_storage × other_attributes)
- Start with minimum thresholds, test ALL possibilities - don't stop at first match
- Compare prices to find most cost-effective solution
- Prove optimality: Verify no cheaper option exists within requirements

**Regional Comparison:**
- Use identical filters across different regions
- Compare same instance types between us-east-1 vs eu-west-1
- Analyze pricing variations for capacity planning

**Compliance/Reporting:**
- Retrieve pricing for specific instance families or configurations
- Generate cost reports for budget planning
- Document pricing for procurement processes

**Research/Analysis:**
- Compare pricing across different service tiers
- Analyze cost implications of different configurations
- Investigate pricing patterns for forecasting

**CRITICAL REQUIREMENTS:**
- **USE SPECIFIC FILTERS**: Large services (EC2, RDS) require 2-3 filters minimum
- **VERIFY EXISTENCE**: Ensure all filter values exist in the service before querying
- **FOR "CHEAPEST" QUERIES**: Build complete matrix, test ALL qualifying combinations, prove optimality

**CONTEXT AND CONSTRAINTS:**
- **CURRENT PRICING ONLY:** Use get_price_list_file for historical data
- **NO SAVINGS PLANS/SPOT:** Only On-Demand and Reserved Instance pricing
- **REGION AUTO-FILTER:** 'region' parameter creates regionCode filter automatically

**REQUIRED INPUTS:**
- `service_code`: (e.g., 'AmazonEC2', 'AmazonS3')
- `region`: AWS region (e.g., 'us-east-1')
- `filters`: Built using discovered values (MANDATORY for large services)
- `max_allowed_characters`: Response limit (default: 100,000)

**ANTI-PATTERNS - AVOID THESE:**
❌ Using broad queries without specific filters on large services
❌ Assuming attribute values exist across different services/regions
❌ **Stopping at first qualifying option when seeking cheapest price**
❌ **Testing only "obvious" instance sizes - smaller may be cheaper**

**EXAMPLE USE CASES:**

**1. Cost Optimization Example:**
```python
# Find cheapest option meeting requirements
qualifying_memory = [m for m in memory_options if meets_requirement(m, "≥8GB")]
# Test combinations starting with minimum qualifying specs
```

**2. Regional Comparison Example:**
```python
# Compare same configuration across regions
filters = {"filters": [{"Field": "instanceType", "Value": "m5.large", "Type": "TERM_MATCH"}]}
us_pricing = get_pricing('AmazonEC2', 'us-east-1', filters)
eu_pricing = get_pricing('AmazonEC2', 'eu-west-1', filters)
```

**3. Research/Analysis Example:**
```python
# Compare different memory tiers for same instance family
memory_tiers = ["4 GiB", "8 GiB", "16 GiB"]
for memory in memory_tiers:
   filters = {"filters": [{"Field": "memory", "Value": memory, "Type": "TERM_MATCH"}]}
   pricing = get_pricing('AmazonEC2', 'us-east-1', filters)
```

**FILTERING STRATEGY:**
- **Large Services (EC2, RDS)**: ALWAYS use 2-3 specific filters to prevent 200+ record responses
- **Small Services**: May work with single filter or no filters
- **Multi-Region Analysis**: Use identical filters across regions for accurate comparison
- **Requirement-Based**: Systematically discover ALL options meeting criteria
- **Cost Optimization**: Start with minimum qualifying thresholds, use minimum-threshold filtering, test all qualifying combinations

**SUCCESS CRITERIA:**
✅ Applied appropriate filters for the service size
✅ For cost optimization: tested all qualifying combinations and proved optimality

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionYesAWS region (e.g., "us-east-1", "us-west-2", "eu-west-1")
filtersNoOptional filters for pricing queries
service_codeYesAWS service code (e.g., "AmazonEC2", "AmazonS3", "AmazonES")
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that only current pricing is available, the region parameter auto-creates a regionCode filter, large services require 2-3 filters to avoid 200+ record responses, and there is a default max_allowed_characters limit. However, it does not describe the response format or error behavior, leaving some gaps for a tool with no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with headings, code blocks, bullet lists, and front-loaded purpose. However, it is verbose and repeats cost-optimization strategies multiple times, which could be condensed. The organization helps an agent navigate the content, but conciseness suffers from redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description could explicitly state the return format, but it thoroughly covers service discovery, filter construction, constraints, and use cases. The extensive workflow and examples provide sufficient context for correct invocation. Missing auth, error handling, and exact response structure are minor gaps for this API-oriented tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds substantial value: it explains service code discrepancies (e.g., 'AmazonES' vs 'AmazonOpenSearchService'), region auto-filter behavior, and the mandatory filter requirements for large services. Extensive code examples show exact filter structures and parameter usage, exceeding the schema baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Get detailed pricing information from AWS Price List API with optional filters', a clear verb+resource statement. It further defines the purpose as retrieving AWS pricing data for cost optimization, regional comparisons, compliance reporting, and research, distinguishing it from sibling analysis and reporting tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use guidance: use get_price_list_file for historical data, avoid savings plans/spot pricing, and apply specific filters for large services. It includes anti-patterns, success criteria, and detailed use-case examples, giving the agent clear direction on when and how to invoke the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arshu200/MCP-Pricing'

If you have feedback or need assistance with the MCP directory API, please join our Discord server