Scaleway · Capability

Serverless Functions API — Tokens

Serverless Functions API — Tokens. 4 operations. Lead operation: List all tokens. Self-contained Naftiko capability covering one Scaleway business surface.

Run with Naftiko ScalewayTokens

What You Can Do

GET
Listtokens — List all tokens
/v1/functions/v1beta1/regions/{region}/tokens
POST
Createtoken — Create a new revocable token
/v1/functions/v1beta1/regions/{region}/tokens
GET
Gettoken — Get a token
/v1/functions/v1beta1/regions/{region}/tokens/{token-id}
DELETE
Deletetoken — Delete a token
/v1/functions/v1beta1/regions/{region}/tokens/{token-id}

MCP Tools

list-all-tokens

List all tokens

read-only idempotent
create-new-revocable-token

Create a new revocable token

get-token

Get a token

read-only idempotent
delete-token

Delete a token

idempotent

Capability Spec

serverless-functions-tokens.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Serverless Functions API — Tokens
  description: 'Serverless Functions API — Tokens. 4 operations. Lead operation: List all tokens. Self-contained Naftiko capability
    covering one Scaleway business surface.'
  tags:
  - Scaleway
  - Tokens
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SCALEWAY_API_KEY: SCALEWAY_API_KEY
capability:
  consumes:
  - type: http
    namespace: serverless-functions-tokens
    baseUri: https://api.scaleway.com
    description: Serverless Functions API — Tokens business capability. Self-contained, no shared references.
    resources:
    - name: functions-v1beta1-regions-region-tokens
      path: /functions/v1beta1/regions/{region}/tokens
      operations:
      - name: listtokens
        method: GET
        description: List all tokens
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: region
          in: path
          type: string
          description: The region you want to target
          required: true
        - name: page
          in: query
          type: integer
          description: Page number.
        - name: page_size
          in: query
          type: integer
          description: Number of tokens per page.
        - name: order_by
          in: query
          type: string
          description: Sort order for the tokens.
        - name: function_id
          in: query
          type: string
          description: UUID of the function the token is associated with.
        - name: namespace_id
          in: query
          type: string
          description: UUID of the namespace the token is associated with.
      - name: createtoken
        method: POST
        description: Create a new revocable token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: region
          in: path
          type: string
          description: The region you want to target
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: functions-v1beta1-regions-region-tokens-token_id
      path: /functions/v1beta1/regions/{region}/tokens/{token_id}
      operations:
      - name: gettoken
        method: GET
        description: Get a token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: region
          in: path
          type: string
          description: The region you want to target
          required: true
        - name: token_id
          in: path
          type: string
          description: UUID of the token to get.
          required: true
      - name: deletetoken
        method: DELETE
        description: Delete a token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: region
          in: path
          type: string
          description: The region you want to target
          required: true
        - name: token_id
          in: path
          type: string
          description: UUID of the token to delete.
          required: true
    authentication:
      type: apikey
      key: X-Auth-Token
      value: '{{env.SCALEWAY_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: serverless-functions-tokens-rest
    port: 8080
    description: REST adapter for Serverless Functions API — Tokens. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/functions/v1beta1/regions/{region}/tokens
      name: functions-v1beta1-regions-region-tokens
      description: REST surface for functions-v1beta1-regions-region-tokens.
      operations:
      - method: GET
        name: listtokens
        description: List all tokens
        call: serverless-functions-tokens.listtokens
        with:
          region: rest.region
          page: rest.page
          page_size: rest.page_size
          order_by: rest.order_by
          function_id: rest.function_id
          namespace_id: rest.namespace_id
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createtoken
        description: Create a new revocable token
        call: serverless-functions-tokens.createtoken
        with:
          region: rest.region
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/functions/v1beta1/regions/{region}/tokens/{token-id}
      name: functions-v1beta1-regions-region-tokens-token-id
      description: REST surface for functions-v1beta1-regions-region-tokens-token_id.
      operations:
      - method: GET
        name: gettoken
        description: Get a token
        call: serverless-functions-tokens.gettoken
        with:
          region: rest.region
          token_id: rest.token_id
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletetoken
        description: Delete a token
        call: serverless-functions-tokens.deletetoken
        with:
          region: rest.region
          token_id: rest.token_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: serverless-functions-tokens-mcp
    port: 9090
    transport: http
    description: MCP adapter for Serverless Functions API — Tokens. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-all-tokens
      description: List all tokens
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: serverless-functions-tokens.listtokens
      with:
        region: tools.region
        page: tools.page
        page_size: tools.page_size
        order_by: tools.order_by
        function_id: tools.function_id
        namespace_id: tools.namespace_id
      outputParameters:
      - type: object
        mapping: $.
    - name: create-new-revocable-token
      description: Create a new revocable token
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: serverless-functions-tokens.createtoken
      with:
        region: tools.region
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-token
      description: Get a token
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: serverless-functions-tokens.gettoken
      with:
        region: tools.region
        token_id: tools.token_id
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-token
      description: Delete a token
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: serverless-functions-tokens.deletetoken
      with:
        region: tools.region
        token_id: tools.token_id
      outputParameters:
      - type: object
        mapping: $.