naftiko: 1.0.0-alpha2 info: label: Metals.Dev API — Rates description: 'Metals.Dev API — Rates. 2 operations. Lead operation: Get latest rates. Self-contained Naftiko capability covering one Metals Dev business surface.' tags: - Metals Dev - Rates created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: METALS_DEV_API_KEY: METALS_DEV_API_KEY capability: consumes: - type: http namespace: metals-dev-rates baseUri: https://api.metals.dev/v1 description: Metals.Dev API — Rates business capability. Self-contained, no shared references. resources: - name: latest path: /latest operations: - name: getlatest method: GET description: Get latest rates outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: currency in: query type: string description: Three-letter currency code. Defaults to USD. - name: unit in: query type: string description: Unit of measure (toz, g, kg, mt). Defaults to toz for precious metals and mt for industrial. - name: timeseries path: /timeseries operations: - name: gettimeseries method: GET description: Get historical timeseries outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: start_date in: query type: string required: true - name: end_date in: query type: string required: true authentication: type: apikey key: api_key value: '{{env.METALS_DEV_API_KEY}}' placement: query exposes: - type: rest namespace: metals-dev-rates-rest port: 8080 description: REST adapter for Metals.Dev API — Rates. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/latest name: latest description: REST surface for latest. operations: - method: GET name: getlatest description: Get latest rates call: metals-dev-rates.getlatest with: currency: rest.currency unit: rest.unit outputParameters: - type: object mapping: $. - path: /v1/timeseries name: timeseries description: REST surface for timeseries. operations: - method: GET name: gettimeseries description: Get historical timeseries call: metals-dev-rates.gettimeseries with: start_date: rest.start_date end_date: rest.end_date outputParameters: - type: object mapping: $. - type: mcp namespace: metals-dev-rates-mcp port: 9090 transport: http description: MCP adapter for Metals.Dev API — Rates. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-latest-rates description: Get latest rates hints: readOnly: true destructive: false idempotent: true call: metals-dev-rates.getlatest with: currency: tools.currency unit: tools.unit outputParameters: - type: object mapping: $. - name: get-historical-timeseries description: Get historical timeseries hints: readOnly: true destructive: false idempotent: true call: metals-dev-rates.gettimeseries with: start_date: tools.start_date end_date: tools.end_date outputParameters: - type: object mapping: $.