naftiko: 1.0.0-alpha2 info: label: GitHub Repos API — Files description: 'GitHub Repos API — Files. 3 operations. Lead operation: Create Or Update File Contents. Self-contained Naftiko capability covering one Github business surface.' tags: - Github - Files created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: GITHUB_API_KEY: GITHUB_API_KEY capability: consumes: - type: http namespace: temp-files baseUri: '' description: GitHub Repos API — Files business capability. Self-contained, no shared references. resources: - name: repos-owner-repo-contents-path path: /repos/{owner}/{repo}/contents/{path} operations: - name: createorupdatefilecontents method: PUT description: Create Or Update File Contents outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: path in: path type: string description: path parameter required: true - name: Authorization in: header type: string - name: X-GitHub-Api-Version in: header type: string - name: Accept in: header type: string - name: body in: body type: object description: Request body (JSON). required: true - name: deletefile method: DELETE description: Delete File outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: path in: path type: string description: path parameter required: true - name: Authorization in: header type: string - name: X-GitHub-Api-Version in: header type: string - name: Accept in: header type: string - name: body in: body type: object description: Request body (JSON). required: true - name: repos-owner-repo-pulls-pull_number-files path: /repos/{owner}/{repo}/pulls/{pull_number}/files operations: - name: listpullrequestsfiles method: GET description: List Pull Requests Files outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Authorization in: header type: string - name: X-GitHub-Api-Version in: header type: string - name: Accept in: header type: string authentication: type: bearer token: '{{env.GITHUB_API_KEY}}' exposes: - type: rest namespace: temp-files-rest port: 8080 description: REST adapter for GitHub Repos API — Files. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/repos/{owner}/{repo}/contents/{path} name: repos-owner-repo-contents-path description: REST surface for repos-owner-repo-contents-path. operations: - method: PUT name: createorupdatefilecontents description: Create Or Update File Contents call: temp-files.createorupdatefilecontents with: path: rest.path Authorization: rest.Authorization X-GitHub-Api-Version: rest.X-GitHub-Api-Version Accept: rest.Accept body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deletefile description: Delete File call: temp-files.deletefile with: path: rest.path Authorization: rest.Authorization X-GitHub-Api-Version: rest.X-GitHub-Api-Version Accept: rest.Accept body: rest.body outputParameters: - type: object mapping: $. - path: /v1/repos/{owner}/{repo}/pulls/{pull-number}/files name: repos-owner-repo-pulls-pull-number-files description: REST surface for repos-owner-repo-pulls-pull_number-files. operations: - method: GET name: listpullrequestsfiles description: List Pull Requests Files call: temp-files.listpullrequestsfiles with: Authorization: rest.Authorization X-GitHub-Api-Version: rest.X-GitHub-Api-Version Accept: rest.Accept outputParameters: - type: object mapping: $. - type: mcp namespace: temp-files-mcp port: 9090 transport: http description: MCP adapter for GitHub Repos API — Files. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: create-update-file-contents description: Create Or Update File Contents hints: readOnly: false destructive: false idempotent: true call: temp-files.createorupdatefilecontents with: path: tools.path Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept body: tools.body outputParameters: - type: object mapping: $. - name: delete-file description: Delete File hints: readOnly: false destructive: true idempotent: true call: temp-files.deletefile with: path: tools.path Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept body: tools.body outputParameters: - type: object mapping: $. - name: list-pull-requests-files description: List Pull Requests Files hints: readOnly: true destructive: false idempotent: true call: temp-files.listpullrequestsfiles with: Authorization: tools.Authorization X-GitHub-Api-Version: tools.X-GitHub-Api-Version Accept: tools.Accept outputParameters: - type: object mapping: $.