naftiko: 1.0.0-alpha2 info: label: OpenAI files — Threads description: 'OpenAI files — Threads. 2 operations. Lead operation: OpenAI Returns a list of message files.. Self-contained Naftiko capability covering one Openai business surface.' tags: - Openai - Threads created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: OPENAI_API_KEY: OPENAI_API_KEY capability: consumes: - type: http namespace: files-threads baseUri: https://api.openai.com/v1 description: OpenAI files — Threads business capability. Self-contained, no shared references. resources: - name: threads-thread_id-messages-message_id-files path: /threads/{thread_id}/messages/{message_id}/files operations: - name: listmessagefiles method: GET description: OpenAI Returns a list of message files. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: thread_id in: path type: string description: The ID of the thread that the message and files belong to. required: true - name: message_id in: path type: string description: The ID of the message that the files belongs to. required: true - name: limit in: query type: integer description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - name: order in: query type: string description: Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. - name: after in: query type: string description: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, e - name: before in: query type: string description: 'A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ' - name: threads-thread_id-messages-message_id-files-file_id path: /threads/{thread_id}/messages/{message_id}/files/{file_id} operations: - name: getmessagefile method: GET description: OpenAI Retrieves a message file. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: thread_id in: path type: string description: The ID of the thread to which the message and File belong. required: true - name: message_id in: path type: string description: The ID of the message the file belongs to. required: true - name: file_id in: path type: string description: The ID of the file being retrieved. required: true authentication: type: bearer token: '{{env.OPENAI_API_KEY}}' exposes: - type: rest namespace: files-threads-rest port: 8080 description: REST adapter for OpenAI files — Threads. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/threads/{thread-id}/messages/{message-id}/files name: threads-thread-id-messages-message-id-files description: REST surface for threads-thread_id-messages-message_id-files. operations: - method: GET name: listmessagefiles description: OpenAI Returns a list of message files. call: files-threads.listmessagefiles with: thread_id: rest.thread_id message_id: rest.message_id limit: rest.limit order: rest.order after: rest.after before: rest.before outputParameters: - type: object mapping: $. - path: /v1/threads/{thread-id}/messages/{message-id}/files/{file-id} name: threads-thread-id-messages-message-id-files-file-id description: REST surface for threads-thread_id-messages-message_id-files-file_id. operations: - method: GET name: getmessagefile description: OpenAI Retrieves a message file. call: files-threads.getmessagefile with: thread_id: rest.thread_id message_id: rest.message_id file_id: rest.file_id outputParameters: - type: object mapping: $. - type: mcp namespace: files-threads-mcp port: 9090 transport: http description: MCP adapter for OpenAI files — Threads. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: openai-returns-list-message-files description: OpenAI Returns a list of message files. hints: readOnly: true destructive: false idempotent: true call: files-threads.listmessagefiles with: thread_id: tools.thread_id message_id: tools.message_id limit: tools.limit order: tools.order after: tools.after before: tools.before outputParameters: - type: object mapping: $. - name: openai-retrieves-message-file description: OpenAI Retrieves a message file. hints: readOnly: true destructive: false idempotent: true call: files-threads.getmessagefile with: thread_id: tools.thread_id message_id: tools.message_id file_id: tools.file_id outputParameters: - type: object mapping: $.