Oracle Cloud Identity and Access Management API — Compartments

Oracle Cloud Identity and Access Management API — Compartments. 1 operations. Lead operation: Oracle Cloud List Compartments. Self-contained Naftiko capability covering one Oracle Cloud business surface.

Run with Naftiko Oracle CloudCompartments

What You Can Do

GET
Listcompartments — Oracle Cloud List Compartments
/v1/compartments

MCP Tools

oracle-cloud-list-compartments

Oracle Cloud List Compartments

read-only idempotent

Capability Spec

iam-compartments.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Oracle Cloud Identity and Access Management API — Compartments
  description: 'Oracle Cloud Identity and Access Management API — Compartments. 1 operations. Lead operation: Oracle Cloud
    List Compartments. Self-contained Naftiko capability covering one Oracle Cloud business surface.'
  tags:
  - Oracle Cloud
  - Compartments
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    ORACLE_CLOUD_API_KEY: ORACLE_CLOUD_API_KEY
capability:
  consumes:
  - type: http
    namespace: iam-compartments
    baseUri: https://identity.{region}.oraclecloud.com/20160918
    description: Oracle Cloud Identity and Access Management API — Compartments business capability. Self-contained, no shared
      references.
    resources:
    - name: compartments
      path: /compartments
      operations:
      - name: listcompartments
        method: GET
        description: Oracle Cloud List Compartments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: compartmentId
          in: query
          type: string
          description: The OCID of the tenancy.
          required: true
    authentication:
      type: bearer
      token: '{{env.ORACLE_CLOUD_API_KEY}}'
  exposes:
  - type: rest
    namespace: iam-compartments-rest
    port: 8080
    description: REST adapter for Oracle Cloud Identity and Access Management API — Compartments. One Spectral-compliant resource
      per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/compartments
      name: compartments
      description: REST surface for compartments.
      operations:
      - method: GET
        name: listcompartments
        description: Oracle Cloud List Compartments
        call: iam-compartments.listcompartments
        with:
          compartmentId: rest.compartmentId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: iam-compartments-mcp
    port: 9090
    transport: http
    description: MCP adapter for Oracle Cloud Identity and Access Management API — Compartments. One tool per consumed operation,
      routed inline through this capability's consumes block.
    tools:
    - name: oracle-cloud-list-compartments
      description: Oracle Cloud List Compartments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: iam-compartments.listcompartments
      with:
        compartmentId: tools.compartmentId
      outputParameters:
      - type: object
        mapping: $.