naftiko: "1.0.0-alpha2" info: label: "Cat Facts API — Facts" description: >- Cat Facts — Facts. 2 operations. Lead operation: Get Random Fact. Self-contained Naftiko capability covering one Cat Facts business surface: random cat trivia delivered individually or in Laravel-style paginated lists. No authentication. tags: - Cat Facts - Animals - Trivia - Facts created: "2026-05-30" modified: "2026-05-30" binds: [] capability: # ── 1. Consumes — the upstream HTTP API this capability speaks to ───── consumes: - type: http namespace: "cat-facts-catfact-facts" baseUri: "https://catfact.ninja" description: "Cat Facts API — Facts business capability. Self-contained, no shared references." resources: - name: "fact" path: "/fact" operations: - name: "getRandomFact" method: GET description: "Returns a single random cat fact, optionally length-constrained." inputParameters: - name: "max_length" in: query type: integer required: false description: "Maximum length, in characters, of the returned fact." outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "facts" path: "/facts" operations: - name: "getFacts" method: GET description: "Returns a paginated list of cat facts." inputParameters: - name: "max_length" in: query type: integer required: false description: "Maximum length, in characters, of each returned fact." - name: "limit" in: query type: integer required: false description: "Number of facts to return per page." outputRawFormat: json outputParameters: - name: result type: object value: "$." # ── 2. REST exposer — required default. One Spectral-compliant resource per consumed op ── exposes: - type: rest namespace: "cat-facts-catfact-facts-rest" port: 8080 description: "REST adapter for Cat Facts API — Facts. One Spectral-compliant resource per consumed operation, prefixed with /v1." resources: - path: "/v1/fact" name: "fact" description: "REST surface for the single random fact endpoint." operations: - method: GET name: "getRandomFact" description: "Returns a single random cat fact, optionally length-constrained." call: "cat-facts-catfact-facts.getRandomFact" with: "max_length": "rest.max_length" outputParameters: - type: object mapping: "$." - path: "/v1/facts" name: "facts" description: "REST surface for the paginated facts list endpoint." operations: - method: GET name: "getFacts" description: "Returns a paginated list of cat facts." call: "cat-facts-catfact-facts.getFacts" with: "max_length": "rest.max_length" "limit": "rest.limit" outputParameters: - type: object mapping: "$." # ── 3. MCP exposer — required default. One verb-noun tool per consumed op ── - type: mcp namespace: "cat-facts-catfact-facts-mcp" port: 9090 transport: http description: "MCP adapter for Cat Facts API — Facts. One tool per consumed operation, routed inline through this capability's consumes block." tools: - name: "get-random-fact" description: "Returns a single random cat fact, optionally length-constrained." hints: readOnly: true destructive: false idempotent: true call: "cat-facts-catfact-facts.getRandomFact" with: "max_length": "tools.max_length" outputParameters: - type: object mapping: "$." - name: "list-facts" description: "Returns a paginated list of cat facts." hints: readOnly: true destructive: false idempotent: true call: "cat-facts-catfact-facts.getFacts" with: "max_length": "tools.max_length" "limit": "tools.limit" outputParameters: - type: object mapping: "$."