Tray.ai · Capability

Tray.ai Embedded API — Authentication

Tray.ai Embedded API — Authentication. 2 operations. Lead operation: Tray.ai GraphQL Playground. Self-contained Naftiko capability covering one Tray Ai business surface.

Run with Naftiko Tray AiAuthentication

What You Can Do

GET
Graphqlplayground — Tray.ai GraphQL Playground
/v1/graphql
POST
Authorize — Tray.ai Create User Token (Authorize)
/v1/graphql-authorize

MCP Tools

tray-ai-graphql-playground

Tray.ai GraphQL Playground

read-only idempotent
tray-ai-create-user-token-authorize

Tray.ai Create User Token (Authorize)

Capability Spec

embedded-authentication.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Tray.ai Embedded API — Authentication
  description: 'Tray.ai Embedded API — Authentication. 2 operations. Lead operation: Tray.ai GraphQL Playground. Self-contained
    Naftiko capability covering one Tray Ai business surface.'
  tags:
  - Tray Ai
  - Authentication
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TRAY_AI_API_KEY: TRAY_AI_API_KEY
capability:
  consumes:
  - type: http
    namespace: embedded-authentication
    baseUri: https://tray.io
    description: Tray.ai Embedded API — Authentication business capability. Self-contained, no shared references.
    resources:
    - name: graphql
      path: /graphql
      operations:
      - name: graphqlplayground
        method: GET
        description: Tray.ai GraphQL Playground
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: graphql#authorize
      path: /graphql#authorize
      operations:
      - name: authorize
        method: POST
        description: Tray.ai Create User Token (Authorize)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.TRAY_AI_API_KEY}}'
  exposes:
  - type: rest
    namespace: embedded-authentication-rest
    port: 8080
    description: REST adapter for Tray.ai Embedded API — Authentication. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/graphql
      name: graphql
      description: REST surface for graphql.
      operations:
      - method: GET
        name: graphqlplayground
        description: Tray.ai GraphQL Playground
        call: embedded-authentication.graphqlplayground
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/graphql-authorize
      name: graphql-authorize
      description: REST surface for graphql#authorize.
      operations:
      - method: POST
        name: authorize
        description: Tray.ai Create User Token (Authorize)
        call: embedded-authentication.authorize
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: embedded-authentication-mcp
    port: 9090
    transport: http
    description: MCP adapter for Tray.ai Embedded API — Authentication. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: tray-ai-graphql-playground
      description: Tray.ai GraphQL Playground
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: embedded-authentication.graphqlplayground
      outputParameters:
      - type: object
        mapping: $.
    - name: tray-ai-create-user-token-authorize
      description: Tray.ai Create User Token (Authorize)
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: embedded-authentication.authorize
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.