Skip to main content
Glama
resources.ts2.36 kB
import { readFileSync } from 'fs'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); export interface UsageResource { uri: string; name: string; description: string; mimeType: string; } export const USAGE_RESOURCES: UsageResource[] = [ { uri: 'infracost://usage/small', name: 'Infracost Usage Defaults - Small ($5/month)', description: 'Small usage defaults for Infracost. Sets each usage-based cost to approximately $5/month for common configurations. Useful for development and small-scale environments.', mimeType: 'text/yaml', }, { uri: 'infracost://usage/medium', name: 'Infracost Usage Defaults - Medium ($10/month)', description: 'Medium usage defaults for Infracost. Sets each usage-based cost to approximately $10/month for common configurations. Useful for staging and medium-scale environments.', mimeType: 'text/yaml', }, { uri: 'infracost://usage/large', name: 'Infracost Usage Defaults - Large ($20/month)', description: 'Large usage defaults for Infracost. Sets each usage-based cost to approximately $20/month for common configurations. Useful for production and large-scale environments.', mimeType: 'text/yaml', }, { uri: 'infracost://usage/example', name: 'Infracost Usage Example', description: 'Example infracost-usage.yml file showing how to customize usage values for specific resources. Can be used as a template for creating custom usage files.', mimeType: 'text/yaml', }, ]; export function getUsageResourceContent(uri: string): string { const resourcesDir = join(__dirname, '..', 'resources'); switch (uri) { case 'infracost://usage/small': return readFileSync(join(resourcesDir, 'infracost-usage-defaults.small.yml'), 'utf-8'); case 'infracost://usage/medium': return readFileSync(join(resourcesDir, 'infracost-usage-defaults.medium.yml'), 'utf-8'); case 'infracost://usage/large': return readFileSync(join(resourcesDir, 'infracost-usage-defaults.large.yml'), 'utf-8'); case 'infracost://usage/example': return readFileSync(join(resourcesDir, 'infracost-usage-example.yml'), 'utf-8'); default: throw new Error(`Unknown resource URI: ${uri}`); } }

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/phildougherty/infracost_mcp'

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