naftiko: 1.0.0-alpha2 info: label: Segment Profile API — Traits description: 'Segment Profile API — Traits. 2 operations. Lead operation: Get account traits. Self-contained Naftiko capability covering one Segment business surface.' tags: - Segment - Traits created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: SEGMENT_API_KEY: SEGMENT_API_KEY capability: consumes: - type: http namespace: profile-traits baseUri: https://profiles.segment.com/v1/spaces/{spaceId} description: Segment Profile API — Traits business capability. Self-contained, no shared references. resources: - name: collections-accounts-profiles-externalId-traits path: /collections/accounts/profiles/{externalId}/traits operations: - name: getaccounttraits method: GET description: Get account traits outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: include in: query type: string description: Comma-separated list of trait names to include. - name: collections-users-profiles-externalId-traits path: /collections/users/profiles/{externalId}/traits operations: - name: getusertraits method: GET description: Get user traits outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: include in: query type: string description: Comma-separated list of trait names to include in the response. Recommended for best performance. authentication: type: basic username: '{{env.SEGMENT_USER}}' password: '{{env.SEGMENT_PASS}}' exposes: - type: rest namespace: profile-traits-rest port: 8080 description: REST adapter for Segment Profile API — Traits. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/collections/accounts/profiles/{externalid}/traits name: collections-accounts-profiles-externalid-traits description: REST surface for collections-accounts-profiles-externalId-traits. operations: - method: GET name: getaccounttraits description: Get account traits call: profile-traits.getaccounttraits with: include: rest.include outputParameters: - type: object mapping: $. - path: /v1/collections/users/profiles/{externalid}/traits name: collections-users-profiles-externalid-traits description: REST surface for collections-users-profiles-externalId-traits. operations: - method: GET name: getusertraits description: Get user traits call: profile-traits.getusertraits with: include: rest.include outputParameters: - type: object mapping: $. - type: mcp namespace: profile-traits-mcp port: 9090 transport: http description: MCP adapter for Segment Profile API — Traits. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-account-traits description: Get account traits hints: readOnly: true destructive: false idempotent: true call: profile-traits.getaccounttraits with: include: tools.include outputParameters: - type: object mapping: $. - name: get-user-traits description: Get user traits hints: readOnly: true destructive: false idempotent: true call: profile-traits.getusertraits with: include: tools.include outputParameters: - type: object mapping: $.