naftiko: 1.0.0-alpha2 info: label: Tuya Device Management API — Device Users description: 'Tuya Device Management API — Device Users. 4 operations. Lead operation: Add Device User. Self-contained Naftiko capability covering one Tuya business surface.' tags: - Tuya - Device Users created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: TUYA_API_KEY: TUYA_API_KEY capability: consumes: - type: http namespace: device-management-device-users baseUri: https://openapi.tuyaus.com description: Tuya Device Management API — Device Users business capability. Self-contained, no shared references. resources: - name: v1.0-devices-device_id-users path: /v1.0/devices/{device_id}/users operations: - name: adddeviceuser method: POST description: Add Device User outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: v1.0-devices-device_id-users-user_id path: /v1.0/devices/{device_id}/users/{user_id} operations: - name: getdeviceuser method: GET description: Get Device User outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: path type: string description: User ID required: true - name: updatedeviceuser method: PUT description: Update Device User outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: path type: string description: User ID required: true - name: body in: body type: object description: Request body (JSON). required: true - name: removedeviceuser method: DELETE description: Remove Device User outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: path type: string description: User ID required: true authentication: type: apikey key: client_id value: '{{env.TUYA_API_KEY}}' placement: header exposes: - type: rest namespace: device-management-device-users-rest port: 8080 description: REST adapter for Tuya Device Management API — Device Users. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v1-0/devices/{device-id}/users name: v1-0-devices-device-id-users description: REST surface for v1.0-devices-device_id-users. operations: - method: POST name: adddeviceuser description: Add Device User call: device-management-device-users.adddeviceuser with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1-0/devices/{device-id}/users/{user-id} name: v1-0-devices-device-id-users-user-id description: REST surface for v1.0-devices-device_id-users-user_id. operations: - method: GET name: getdeviceuser description: Get Device User call: device-management-device-users.getdeviceuser with: user_id: rest.user_id outputParameters: - type: object mapping: $. - method: PUT name: updatedeviceuser description: Update Device User call: device-management-device-users.updatedeviceuser with: user_id: rest.user_id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: removedeviceuser description: Remove Device User call: device-management-device-users.removedeviceuser with: user_id: rest.user_id outputParameters: - type: object mapping: $. - type: mcp namespace: device-management-device-users-mcp port: 9090 transport: http description: MCP adapter for Tuya Device Management API — Device Users. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: add-device-user description: Add Device User hints: readOnly: false destructive: false idempotent: false call: device-management-device-users.adddeviceuser with: body: tools.body outputParameters: - type: object mapping: $. - name: get-device-user description: Get Device User hints: readOnly: true destructive: false idempotent: true call: device-management-device-users.getdeviceuser with: user_id: tools.user_id outputParameters: - type: object mapping: $. - name: update-device-user description: Update Device User hints: readOnly: false destructive: false idempotent: true call: device-management-device-users.updatedeviceuser with: user_id: tools.user_id body: tools.body outputParameters: - type: object mapping: $. - name: remove-device-user description: Remove Device User hints: readOnly: false destructive: true idempotent: true call: device-management-device-users.removedeviceuser with: user_id: tools.user_id outputParameters: - type: object mapping: $.