naftiko: 1.0.0-alpha2 info: label: Snyk API — Collection description: 'Snyk API — Collection. 8 operations. Lead operation: Get collections. Self-contained Naftiko capability covering one Snyk business surface.' tags: - Snyk - Collection created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: SNYK_API_KEY: SNYK_API_KEY capability: consumes: - type: http namespace: rest-collection baseUri: https://api.snyk.io/rest description: Snyk API — Collection business capability. Self-contained, no shared references. resources: - name: orgs-org_id-collections path: /orgs/{org_id}/collections operations: - name: getcollections method: GET description: Get collections outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Org ID required: true - name: sort in: query type: string description: Return collections sorted by the specified attributes - name: direction in: query type: string description: Return collections sorted in the specified direction - name: name in: query type: string description: Return collections which names include the provided string - name: is_generated in: query type: boolean description: Return collections where is_generated matches the provided boolean - name: createcollection method: POST description: Create a collection outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Org ID required: true - name: body in: body type: object description: Request body (JSON). required: false - name: orgs-org_id-collections-collection_id path: /orgs/{org_id}/collections/{collection_id} operations: - name: deletecollection method: DELETE description: Delete a collection outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Org ID required: true - name: getcollection method: GET description: Get a collection outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Org ID required: true - name: updatecollection method: PATCH description: Edit a collection outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Org ID required: true - name: body in: body type: object description: Request body (JSON). required: false - name: orgs-org_id-collections-collection_id-relationships-projects path: /orgs/{org_id}/collections/{collection_id}/relationships/projects operations: - name: deleteprojectscollection method: DELETE description: Remove projects from a collection outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Org ID required: true - name: body in: body type: object description: Request body (JSON). required: false - name: getprojectsofcollection method: GET description: Get projects from the specified collection outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Org ID required: true - name: sort in: query type: string description: Return projects sorted by the specified attributes - name: direction in: query type: string description: Return projects sorted in the specified direction - name: target_id in: query type: array description: Return projects that belong to the provided targets - name: show in: query type: array description: Return projects that are with or without issues - name: integration in: query type: array description: Return projects that match the provided integration types - name: updatecollectionwithprojects method: POST description: Add projects to a collection outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Org ID required: true - name: body in: body type: object description: Request body (JSON). required: false authentication: type: bearer token: '{{env.SNYK_API_KEY}}' exposes: - type: rest namespace: rest-collection-rest port: 8080 description: REST adapter for Snyk API — Collection. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/orgs/{org-id}/collections name: orgs-org-id-collections description: REST surface for orgs-org_id-collections. operations: - method: GET name: getcollections description: Get collections call: rest-collection.getcollections with: org_id: rest.org_id sort: rest.sort direction: rest.direction name: rest.name is_generated: rest.is_generated outputParameters: - type: object mapping: $. - method: POST name: createcollection description: Create a collection call: rest-collection.createcollection with: org_id: rest.org_id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/orgs/{org-id}/collections/{collection-id} name: orgs-org-id-collections-collection-id description: REST surface for orgs-org_id-collections-collection_id. operations: - method: DELETE name: deletecollection description: Delete a collection call: rest-collection.deletecollection with: org_id: rest.org_id outputParameters: - type: object mapping: $. - method: GET name: getcollection description: Get a collection call: rest-collection.getcollection with: org_id: rest.org_id outputParameters: - type: object mapping: $. - method: PATCH name: updatecollection description: Edit a collection call: rest-collection.updatecollection with: org_id: rest.org_id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/orgs/{org-id}/collections/{collection-id}/relationships/projects name: orgs-org-id-collections-collection-id-relationships-projects description: REST surface for orgs-org_id-collections-collection_id-relationships-projects. operations: - method: DELETE name: deleteprojectscollection description: Remove projects from a collection call: rest-collection.deleteprojectscollection with: org_id: rest.org_id body: rest.body outputParameters: - type: object mapping: $. - method: GET name: getprojectsofcollection description: Get projects from the specified collection call: rest-collection.getprojectsofcollection with: org_id: rest.org_id sort: rest.sort direction: rest.direction target_id: rest.target_id show: rest.show integration: rest.integration outputParameters: - type: object mapping: $. - method: POST name: updatecollectionwithprojects description: Add projects to a collection call: rest-collection.updatecollectionwithprojects with: org_id: rest.org_id body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: rest-collection-mcp port: 9090 transport: http description: MCP adapter for Snyk API — Collection. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-collections description: Get collections hints: readOnly: true destructive: false idempotent: true call: rest-collection.getcollections with: org_id: tools.org_id sort: tools.sort direction: tools.direction name: tools.name is_generated: tools.is_generated outputParameters: - type: object mapping: $. - name: create-collection description: Create a collection hints: readOnly: false destructive: false idempotent: false call: rest-collection.createcollection with: org_id: tools.org_id body: tools.body outputParameters: - type: object mapping: $. - name: delete-collection description: Delete a collection hints: readOnly: false destructive: true idempotent: true call: rest-collection.deletecollection with: org_id: tools.org_id outputParameters: - type: object mapping: $. - name: get-collection description: Get a collection hints: readOnly: true destructive: false idempotent: true call: rest-collection.getcollection with: org_id: tools.org_id outputParameters: - type: object mapping: $. - name: edit-collection description: Edit a collection hints: readOnly: false destructive: false idempotent: true call: rest-collection.updatecollection with: org_id: tools.org_id body: tools.body outputParameters: - type: object mapping: $. - name: remove-projects-collection description: Remove projects from a collection hints: readOnly: false destructive: true idempotent: true call: rest-collection.deleteprojectscollection with: org_id: tools.org_id body: tools.body outputParameters: - type: object mapping: $. - name: get-projects-specified-collection description: Get projects from the specified collection hints: readOnly: true destructive: false idempotent: true call: rest-collection.getprojectsofcollection with: org_id: tools.org_id sort: tools.sort direction: tools.direction target_id: tools.target_id show: tools.show integration: tools.integration outputParameters: - type: object mapping: $. - name: add-projects-collection description: Add projects to a collection hints: readOnly: false destructive: false idempotent: false call: rest-collection.updatecollectionwithprojects with: org_id: tools.org_id body: tools.body outputParameters: - type: object mapping: $.