naftiko: 1.0.0-alpha2 info: label: Trefle API — Kingdoms description: 'Trefle API — Kingdoms. 2 operations. Lead operation: List Kingdoms. Self-contained Naftiko capability covering one Trefle business surface.' tags: - Trefle - Kingdoms created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: TREFLE_API_KEY: TREFLE_API_KEY capability: consumes: - type: http namespace: trefle-kingdoms baseUri: https://trefle.io/api/v1 description: Trefle API — Kingdoms business capability. Self-contained, no shared references. resources: - name: kingdoms path: /kingdoms operations: - name: listkingdoms method: GET description: List Kingdoms outputRawFormat: json outputParameters: - name: result type: object value: $. - name: kingdoms-id path: /kingdoms/{id} operations: - name: getkingdom method: GET description: Get Kingdom outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true authentication: type: apikey key: token value: '{{env.TREFLE_API_KEY}}' placement: query exposes: - type: rest namespace: trefle-kingdoms-rest port: 8080 description: REST adapter for Trefle API — Kingdoms. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/kingdoms name: kingdoms description: REST surface for kingdoms. operations: - method: GET name: listkingdoms description: List Kingdoms call: trefle-kingdoms.listkingdoms outputParameters: - type: object mapping: $. - path: /v1/kingdoms/{id} name: kingdoms-id description: REST surface for kingdoms-id. operations: - method: GET name: getkingdom description: Get Kingdom call: trefle-kingdoms.getkingdom with: id: rest.id outputParameters: - type: object mapping: $. - type: mcp namespace: trefle-kingdoms-mcp port: 9090 transport: http description: MCP adapter for Trefle API — Kingdoms. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-kingdoms description: List Kingdoms hints: readOnly: true destructive: false idempotent: true call: trefle-kingdoms.listkingdoms outputParameters: - type: object mapping: $. - name: get-kingdom description: Get Kingdom hints: readOnly: true destructive: false idempotent: true call: trefle-kingdoms.getkingdom with: id: tools.id outputParameters: - type: object mapping: $.