OptScale · Capability

OptScale REST API — Pools

OptScale REST API — Pools. 3 operations. Lead operation: List pools. Self-contained Naftiko capability covering one Optscale business surface.

Run with Naftiko OptscalePools

What You Can Do

GET
Listpools — List pools
/v1/organizations/{organization-id}/pools
POST
Createpool — Create a pool
/v1/organizations/{organization-id}/pools
GET
Getpool — Get pool
/v1/pools/{pool-id}

MCP Tools

list-pools

List pools

read-only idempotent
create-pool

Create a pool

get-pool

Get pool

read-only idempotent

Capability Spec

optscale-pools.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: OptScale REST API — Pools
  description: 'OptScale REST API — Pools. 3 operations. Lead operation: List pools. Self-contained Naftiko capability covering
    one Optscale business surface.'
  tags:
  - Optscale
  - Pools
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    OPTSCALE_API_KEY: OPTSCALE_API_KEY
capability:
  consumes:
  - type: http
    namespace: optscale-pools
    baseUri: https://{host}/restapi/v2
    description: OptScale REST API — Pools business capability. Self-contained, no shared references.
    resources:
    - name: organizations-organization_id-pools
      path: /organizations/{organization_id}/pools
      operations:
      - name: listpools
        method: GET
        description: List pools
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createpool
        method: POST
        description: Create a pool
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: pools-pool_id
      path: /pools/{pool_id}
      operations:
      - name: getpool
        method: GET
        description: Get pool
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: pool_id
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.OPTSCALE_API_KEY}}'
  exposes:
  - type: rest
    namespace: optscale-pools-rest
    port: 8080
    description: REST adapter for OptScale REST API — Pools. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/organizations/{organization-id}/pools
      name: organizations-organization-id-pools
      description: REST surface for organizations-organization_id-pools.
      operations:
      - method: GET
        name: listpools
        description: List pools
        call: optscale-pools.listpools
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createpool
        description: Create a pool
        call: optscale-pools.createpool
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/pools/{pool-id}
      name: pools-pool-id
      description: REST surface for pools-pool_id.
      operations:
      - method: GET
        name: getpool
        description: Get pool
        call: optscale-pools.getpool
        with:
          pool_id: rest.pool_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: optscale-pools-mcp
    port: 9090
    transport: http
    description: MCP adapter for OptScale REST API — Pools. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-pools
      description: List pools
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: optscale-pools.listpools
      outputParameters:
      - type: object
        mapping: $.
    - name: create-pool
      description: Create a pool
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: optscale-pools.createpool
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-pool
      description: Get pool
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: optscale-pools.getpool
      with:
        pool_id: tools.pool_id
      outputParameters:
      - type: object
        mapping: $.