naftiko: 1.0.0-alpha2 info: label: Unified CRM API — Opportunities description: 'Unified CRM API — Opportunities. 4 operations. Lead operation: Create opportunity. Self-contained Naftiko capability covering one Supaglue business surface.' tags: - Supaglue - Opportunities created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: SUPAGLUE_API_KEY: SUPAGLUE_API_KEY capability: consumes: - type: http namespace: crm-opportunities baseUri: https://api.supaglue.io/crm/v2 description: Unified CRM API — Opportunities business capability. Self-contained, no shared references. resources: - name: opportunities path: /opportunities operations: - name: createopportunity method: POST description: Create opportunity outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: listopportunities method: GET description: List opportunities outputRawFormat: json outputParameters: - name: result type: object value: $. - name: opportunities-opportunity_id path: /opportunities/{opportunity_id} operations: - name: getopportunity method: GET description: Get opportunity outputRawFormat: json outputParameters: - name: result type: object value: $. - name: updateopportunity method: PATCH description: Update opportunity outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true authentication: type: apikey key: x-api-key value: '{{env.SUPAGLUE_API_KEY}}' placement: header exposes: - type: rest namespace: crm-opportunities-rest port: 8080 description: REST adapter for Unified CRM API — Opportunities. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/opportunities name: opportunities description: REST surface for opportunities. operations: - method: POST name: createopportunity description: Create opportunity call: crm-opportunities.createopportunity with: body: rest.body outputParameters: - type: object mapping: $. - method: GET name: listopportunities description: List opportunities call: crm-opportunities.listopportunities outputParameters: - type: object mapping: $. - path: /v1/opportunities/{opportunity-id} name: opportunities-opportunity-id description: REST surface for opportunities-opportunity_id. operations: - method: GET name: getopportunity description: Get opportunity call: crm-opportunities.getopportunity outputParameters: - type: object mapping: $. - method: PATCH name: updateopportunity description: Update opportunity call: crm-opportunities.updateopportunity with: body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: crm-opportunities-mcp port: 9090 transport: http description: MCP adapter for Unified CRM API — Opportunities. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: create-opportunity description: Create opportunity hints: readOnly: false destructive: false idempotent: false call: crm-opportunities.createopportunity with: body: tools.body outputParameters: - type: object mapping: $. - name: list-opportunities description: List opportunities hints: readOnly: true destructive: false idempotent: true call: crm-opportunities.listopportunities outputParameters: - type: object mapping: $. - name: get-opportunity description: Get opportunity hints: readOnly: true destructive: false idempotent: true call: crm-opportunities.getopportunity outputParameters: - type: object mapping: $. - name: update-opportunity description: Update opportunity hints: readOnly: false destructive: false idempotent: true call: crm-opportunities.updateopportunity with: body: tools.body outputParameters: - type: object mapping: $.