sample-aws-pricing-calculator-mcp 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/catalog/services/aWSDataTransfer.json +26 -0
- package/catalog/services/amazonElasticBlockStore.json +27 -0
- package/catalog/services/networkAddressTranslationNatGatewayVpc.json +7 -1
- package/dist/mcp-server.js +57 -53
- package/mcp-server.js +7 -5
- package/package.json +1 -1
package/mcp-server.js
CHANGED
|
@@ -97,7 +97,7 @@ server.tool(
|
|
|
97
97
|
desc.SEARCH_SERVICES,
|
|
98
98
|
{
|
|
99
99
|
query: z.string().describe('One or more search terms, comma-separated (e.g. "Lambda, S3, Amazon Personalize, API Gateway, CloudWatch")'),
|
|
100
|
-
partition: z.string().optional().describe('AWS partition to search in (default: "aws"). Valid values: "aws", "aws-iso", "aws-iso-b"'),
|
|
100
|
+
partition: z.string().optional().describe('AWS partition to search in (default: "aws"). Valid values: "aws", "aws-iso", "aws-iso-b", "aws-eusc"'),
|
|
101
101
|
},
|
|
102
102
|
traceTool('search_services', async ({ query, partition }) => {
|
|
103
103
|
const p = partition || 'aws';
|
|
@@ -118,7 +118,7 @@ server.tool(
|
|
|
118
118
|
desc.GET_SERVICE_FIELDS,
|
|
119
119
|
{
|
|
120
120
|
service: z.string().describe('One or more service keys, comma-separated (e.g. "aWSLambda, amazonS3, stepFunctionStandard, amazonApiGateway")'),
|
|
121
|
-
partition: z.string().optional().describe('AWS partition to fetch from (default: "aws"). Valid values: "aws", "aws-iso", "aws-iso-b"'),
|
|
121
|
+
partition: z.string().optional().describe('AWS partition to fetch from (default: "aws"). Valid values: "aws", "aws-iso", "aws-iso-b", "aws-eusc"'),
|
|
122
122
|
},
|
|
123
123
|
traceTool('get_service_fields', async ({ service, partition }) => {
|
|
124
124
|
const p = partition || 'aws';
|
|
@@ -167,7 +167,7 @@ server.tool(
|
|
|
167
167
|
desc.CREATE_ESTIMATE,
|
|
168
168
|
{
|
|
169
169
|
name: z.string().optional().describe('Name for the estimate (default: "My Estimate")'),
|
|
170
|
-
partition: z.string().optional().describe('AWS partition for this estimate (default: "aws"). Valid values: "aws", "aws-iso", "aws-iso-b"'),
|
|
170
|
+
partition: z.string().optional().describe('AWS partition for this estimate (default: "aws"). Valid values: "aws", "aws-iso", "aws-iso-b", "aws-eusc"'),
|
|
171
171
|
},
|
|
172
172
|
traceTool('create_estimate', async ({ name, partition }) => {
|
|
173
173
|
const partErr = checkPartition(partition);
|
|
@@ -340,7 +340,7 @@ server.tool(
|
|
|
340
340
|
{
|
|
341
341
|
services: z.string().describe('JSON array of service entries. Same shape as add_service. Each entry: {"service":"serviceKey","instance":"optional","group":"optional","config":{...with region, description, and field values}}.'),
|
|
342
342
|
name: z.string().optional().describe('Estimate name (default: "My Estimate")'),
|
|
343
|
-
partition: z.string().optional().describe('AWS partition (default: "aws"). Valid values: "aws", "aws-iso", "aws-iso-b"'),
|
|
343
|
+
partition: z.string().optional().describe('AWS partition (default: "aws"). Valid values: "aws", "aws-iso", "aws-iso-b", "aws-eusc", "aws-eusc"'),
|
|
344
344
|
},
|
|
345
345
|
traceTool('build_estimate', buildEstimateHandler)
|
|
346
346
|
);
|
|
@@ -355,11 +355,13 @@ server.tool(
|
|
|
355
355
|
traceTool('import_estimate', async ({ estimate_id, format }) => {
|
|
356
356
|
// Extract ID from URL if needed
|
|
357
357
|
let id = estimate_id;
|
|
358
|
+
let partition;
|
|
358
359
|
const urlMatch = estimate_id.match(/[?&]id=([a-f0-9]+)/);
|
|
359
360
|
if (urlMatch) id = urlMatch[1];
|
|
361
|
+
if (estimate_id.includes('pricing.calculator.aws.eu')) partition = 'aws-eusc';
|
|
360
362
|
|
|
361
363
|
try {
|
|
362
|
-
const data = await fetchEstimate(id);
|
|
364
|
+
const data = await fetchEstimate(id, { partition });
|
|
363
365
|
const output = (format === 'markdown')
|
|
364
366
|
? estimateToMarkdown(data)
|
|
365
367
|
: JSON.stringify(data, null, 2);
|