naftiko: 1.0.0-alpha2 info: label: Discord OAuth2 API — User Identity description: 'Discord OAuth2 API — User Identity. 5 operations. Lead operation: Discord Get current authorization information. Self-contained Naftiko capability covering one Discord business surface.' tags: - Discord - User Identity created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: DISCORD_API_KEY: DISCORD_API_KEY capability: consumes: - type: http namespace: oauth2-user-identity baseUri: https://discord.com/api/v10 description: Discord OAuth2 API — User Identity business capability. Self-contained, no shared references. resources: - name: oauth2-@me path: /oauth2/@me operations: - name: getcurrentauthorizationinformation method: GET description: Discord Get current authorization information outputRawFormat: json outputParameters: - name: result type: object value: $. - name: oauth2-applications-@me path: /oauth2/applications/@me operations: - name: getmyoauth2application method: GET description: Discord Get current application outputRawFormat: json outputParameters: - name: result type: object value: $. - name: users-@me path: /users/@me operations: - name: getcurrentuser method: GET description: Discord Get current user outputRawFormat: json outputParameters: - name: result type: object value: $. - name: users-@me-connections path: /users/@me/connections operations: - name: getcurrentuserconnections method: GET description: Discord List current user connections outputRawFormat: json outputParameters: - name: result type: object value: $. - name: users-@me-guilds path: /users/@me/guilds operations: - name: getcurrentuserguilds method: GET description: Discord List current user guilds outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: before in: query type: string - name: after in: query type: string - name: limit in: query type: integer authentication: type: bearer token: '{{env.DISCORD_API_KEY}}' exposes: - type: rest namespace: oauth2-user-identity-rest port: 8080 description: REST adapter for Discord OAuth2 API — User Identity. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/oauth2/me name: oauth2-me description: REST surface for oauth2-@me. operations: - method: GET name: getcurrentauthorizationinformation description: Discord Get current authorization information call: oauth2-user-identity.getcurrentauthorizationinformation outputParameters: - type: object mapping: $. - path: /v1/oauth2/applications/me name: oauth2-applications-me description: REST surface for oauth2-applications-@me. operations: - method: GET name: getmyoauth2application description: Discord Get current application call: oauth2-user-identity.getmyoauth2application outputParameters: - type: object mapping: $. - path: /v1/users/me name: users-me description: REST surface for users-@me. operations: - method: GET name: getcurrentuser description: Discord Get current user call: oauth2-user-identity.getcurrentuser outputParameters: - type: object mapping: $. - path: /v1/users/me/connections name: users-me-connections description: REST surface for users-@me-connections. operations: - method: GET name: getcurrentuserconnections description: Discord List current user connections call: oauth2-user-identity.getcurrentuserconnections outputParameters: - type: object mapping: $. - path: /v1/users/me/guilds name: users-me-guilds description: REST surface for users-@me-guilds. operations: - method: GET name: getcurrentuserguilds description: Discord List current user guilds call: oauth2-user-identity.getcurrentuserguilds with: before: rest.before after: rest.after limit: rest.limit outputParameters: - type: object mapping: $. - type: mcp namespace: oauth2-user-identity-mcp port: 9090 transport: http description: MCP adapter for Discord OAuth2 API — User Identity. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: discord-get-current-authorization-information description: Discord Get current authorization information hints: readOnly: true destructive: false idempotent: true call: oauth2-user-identity.getcurrentauthorizationinformation outputParameters: - type: object mapping: $. - name: discord-get-current-application description: Discord Get current application hints: readOnly: true destructive: false idempotent: true call: oauth2-user-identity.getmyoauth2application outputParameters: - type: object mapping: $. - name: discord-get-current-user description: Discord Get current user hints: readOnly: true destructive: false idempotent: true call: oauth2-user-identity.getcurrentuser outputParameters: - type: object mapping: $. - name: discord-list-current-user-connections description: Discord List current user connections hints: readOnly: true destructive: false idempotent: true call: oauth2-user-identity.getcurrentuserconnections outputParameters: - type: object mapping: $. - name: discord-list-current-user-guilds description: Discord List current user guilds hints: readOnly: true destructive: false idempotent: true call: oauth2-user-identity.getcurrentuserguilds with: before: tools.before after: tools.after limit: tools.limit outputParameters: - type: object mapping: $.