Torii · Capability

Torii API — Files

Torii API — Files. 2 operations. Lead operation: Torii Upload file (up to 3MB). Self-contained Naftiko capability covering one Torii business surface.

Run with Naftiko ToriiFiles

What You Can Do

POST
Uploadfile — Torii Upload file (up to 3MB)
/v1/files/upload
GET
Getfileuploadurl — Torii Get file upload URL
/v1/files/url

MCP Tools

torii-upload-file-up-3mb

Torii Upload file (up to 3MB)

torii-get-file-upload-url

Torii Get file upload URL

read-only idempotent

Capability Spec

torii-files.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Torii API — Files
  description: 'Torii API — Files. 2 operations. Lead operation: Torii Upload file (up to 3MB). Self-contained Naftiko capability
    covering one Torii business surface.'
  tags:
  - Torii
  - Files
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TORII_API_KEY: TORII_API_KEY
capability:
  consumes:
  - type: http
    namespace: torii-files
    baseUri: https://api.toriihq.com/v1.0
    description: Torii API — Files business capability. Self-contained, no shared references.
    resources:
    - name: files-upload
      path: /files/upload
      operations:
      - name: uploadfile
        method: POST
        description: Torii Upload file (up to 3MB)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: files-url
      path: /files/url
      operations:
      - name: getfileuploadurl
        method: GET
        description: Torii Get file upload URL
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.TORII_API_KEY}}'
  exposes:
  - type: rest
    namespace: torii-files-rest
    port: 8080
    description: REST adapter for Torii API — Files. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/files/upload
      name: files-upload
      description: REST surface for files-upload.
      operations:
      - method: POST
        name: uploadfile
        description: Torii Upload file (up to 3MB)
        call: torii-files.uploadfile
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/files/url
      name: files-url
      description: REST surface for files-url.
      operations:
      - method: GET
        name: getfileuploadurl
        description: Torii Get file upload URL
        call: torii-files.getfileuploadurl
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: torii-files-mcp
    port: 9090
    transport: http
    description: MCP adapter for Torii API — Files. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: torii-upload-file-up-3mb
      description: Torii Upload file (up to 3MB)
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: torii-files.uploadfile
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: torii-get-file-upload-url
      description: Torii Get file upload URL
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: torii-files.getfileuploadurl
      outputParameters:
      - type: object
        mapping: $.