naftiko: 1.0.0-alpha2 info: label: FatSecret Platform API — Foods description: 'FatSecret Platform API — Foods. 4 operations. Lead operation: Find food by barcode. Self-contained Naftiko capability covering one Fatsecret business surface.' tags: - Fatsecret - Foods created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: FATSECRET_API_KEY: FATSECRET_API_KEY capability: consumes: - type: http namespace: platform-foods baseUri: https://platform.fatsecret.com/rest description: FatSecret Platform API — Foods business capability. Self-contained, no shared references. resources: - name: food-barcode-find-by-id-v1 path: /food/barcode/find-by-id/v1 operations: - name: findfoodbybarcode method: GET description: Find food by barcode outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: barcode in: query type: string required: true - name: food-v4 path: /food/v4 operations: - name: getfood method: GET description: Get food by id outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: food_id in: query type: string required: true - name: foods-autocomplete-v2 path: /foods/autocomplete/v2 operations: - name: autocompletefoods method: GET description: Autocomplete food search outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: expression in: query type: string required: true - name: foods-search-v5 path: /foods/search/v5 operations: - name: searchfoods method: GET description: Search foods outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: search_expression in: query type: string required: true - name: page_number in: query type: integer - name: max_results in: query type: integer authentication: type: bearer token: '{{env.FATSECRET_API_KEY}}' exposes: - type: rest namespace: platform-foods-rest port: 8080 description: REST adapter for FatSecret Platform API — Foods. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/food/barcode/find-by-id/v1 name: food-barcode-find-by-id-v1 description: REST surface for food-barcode-find-by-id-v1. operations: - method: GET name: findfoodbybarcode description: Find food by barcode call: platform-foods.findfoodbybarcode with: barcode: rest.barcode outputParameters: - type: object mapping: $. - path: /v1/food/v4 name: food-v4 description: REST surface for food-v4. operations: - method: GET name: getfood description: Get food by id call: platform-foods.getfood with: food_id: rest.food_id outputParameters: - type: object mapping: $. - path: /v1/foods/autocomplete/v2 name: foods-autocomplete-v2 description: REST surface for foods-autocomplete-v2. operations: - method: GET name: autocompletefoods description: Autocomplete food search call: platform-foods.autocompletefoods with: expression: rest.expression outputParameters: - type: object mapping: $. - path: /v1/foods/search/v5 name: foods-search-v5 description: REST surface for foods-search-v5. operations: - method: GET name: searchfoods description: Search foods call: platform-foods.searchfoods with: search_expression: rest.search_expression page_number: rest.page_number max_results: rest.max_results outputParameters: - type: object mapping: $. - type: mcp namespace: platform-foods-mcp port: 9090 transport: http description: MCP adapter for FatSecret Platform API — Foods. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: find-food-barcode description: Find food by barcode hints: readOnly: true destructive: false idempotent: true call: platform-foods.findfoodbybarcode with: barcode: tools.barcode outputParameters: - type: object mapping: $. - name: get-food-id description: Get food by id hints: readOnly: true destructive: false idempotent: true call: platform-foods.getfood with: food_id: tools.food_id outputParameters: - type: object mapping: $. - name: autocomplete-food-search description: Autocomplete food search hints: readOnly: true destructive: false idempotent: true call: platform-foods.autocompletefoods with: expression: tools.expression outputParameters: - type: object mapping: $. - name: search-foods description: Search foods hints: readOnly: true destructive: false idempotent: true call: platform-foods.searchfoods with: search_expression: tools.search_expression page_number: tools.page_number max_results: tools.max_results outputParameters: - type: object mapping: $.