Google Workspace · Capability

Google Workspace Admin SDK Directory API — OrgUnits

Google Workspace Admin SDK Directory API — OrgUnits. 6 operations. Lead operation: List Organizational Units. Self-contained Naftiko capability covering one Google Workspace business surface.

Run with Naftiko Google WorkspaceOrgUnits

What You Can Do

GET
Listorgunits — List Organizational Units
/v1/admin/directory/v1/customer/{customerid}/orgunits
POST
Insertorgunit — Create an Organizational Unit
/v1/admin/directory/v1/customer/{customerid}/orgunits
GET
Getorgunit — Get an Organizational Unit
/v1/admin/directory/v1/customer/{customerid}/orgunits/{orgunitpath}
PUT
Updateorgunit — Update an Organizational Unit
/v1/admin/directory/v1/customer/{customerid}/orgunits/{orgunitpath}
PATCH
Patchorgunit — Patch an Organizational Unit
/v1/admin/directory/v1/customer/{customerid}/orgunits/{orgunitpath}
DELETE
Deleteorgunit — Delete an Organizational Unit
/v1/admin/directory/v1/customer/{customerid}/orgunits/{orgunitpath}

MCP Tools

list-organizational-units

List Organizational Units

read-only idempotent
create-organizational-unit

Create an Organizational Unit

get-organizational-unit

Get an Organizational Unit

read-only idempotent
update-organizational-unit

Update an Organizational Unit

idempotent
patch-organizational-unit

Patch an Organizational Unit

idempotent
delete-organizational-unit

Delete an Organizational Unit

idempotent

Capability Spec

admin-sdk-directory-orgunits.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Google Workspace Admin SDK Directory API — OrgUnits
  description: 'Google Workspace Admin SDK Directory API — OrgUnits. 6 operations. Lead operation: List Organizational Units.
    Self-contained Naftiko capability covering one Google Workspace business surface.'
  tags:
  - Google Workspace
  - OrgUnits
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GOOGLE_WORKSPACE_API_KEY: GOOGLE_WORKSPACE_API_KEY
capability:
  consumes:
  - type: http
    namespace: admin-sdk-directory-orgunits
    baseUri: https://admin.googleapis.com
    description: Google Workspace Admin SDK Directory API — OrgUnits business capability. Self-contained, no shared references.
    resources:
    - name: admin-directory-v1-customer-customerId-orgunits
      path: /admin/directory/v1/customer/{customerId}/orgunits
      operations:
      - name: listorgunits
        method: GET
        description: List Organizational Units
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: type
          in: query
          type: string
          description: Whether to return all sub-organizations or just immediate children.
        - name: orgUnitPath
          in: query
          type: string
          description: The full path to the organizational unit or its unique ID. Returns child organizational units beneath
            the specified path.
      - name: insertorgunit
        method: POST
        description: Create an Organizational Unit
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: admin-directory-v1-customer-customerId-orgunits-orgUnitPath
      path: /admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}
      operations:
      - name: getorgunit
        method: GET
        description: Get an Organizational Unit
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updateorgunit
        method: PUT
        description: Update an Organizational Unit
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: patchorgunit
        method: PATCH
        description: Patch an Organizational Unit
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteorgunit
        method: DELETE
        description: Delete an Organizational Unit
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.GOOGLE_WORKSPACE_API_KEY}}'
  exposes:
  - type: rest
    namespace: admin-sdk-directory-orgunits-rest
    port: 8080
    description: REST adapter for Google Workspace Admin SDK Directory API — OrgUnits. One Spectral-compliant resource per
      consumed operation, prefixed with /v1.
    resources:
    - path: /v1/admin/directory/v1/customer/{customerid}/orgunits
      name: admin-directory-v1-customer-customerid-orgunits
      description: REST surface for admin-directory-v1-customer-customerId-orgunits.
      operations:
      - method: GET
        name: listorgunits
        description: List Organizational Units
        call: admin-sdk-directory-orgunits.listorgunits
        with:
          type: rest.type
          orgUnitPath: rest.orgUnitPath
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: insertorgunit
        description: Create an Organizational Unit
        call: admin-sdk-directory-orgunits.insertorgunit
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/admin/directory/v1/customer/{customerid}/orgunits/{orgunitpath}
      name: admin-directory-v1-customer-customerid-orgunits-orgunitpath
      description: REST surface for admin-directory-v1-customer-customerId-orgunits-orgUnitPath.
      operations:
      - method: GET
        name: getorgunit
        description: Get an Organizational Unit
        call: admin-sdk-directory-orgunits.getorgunit
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updateorgunit
        description: Update an Organizational Unit
        call: admin-sdk-directory-orgunits.updateorgunit
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: patchorgunit
        description: Patch an Organizational Unit
        call: admin-sdk-directory-orgunits.patchorgunit
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteorgunit
        description: Delete an Organizational Unit
        call: admin-sdk-directory-orgunits.deleteorgunit
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: admin-sdk-directory-orgunits-mcp
    port: 9090
    transport: http
    description: MCP adapter for Google Workspace Admin SDK Directory API — OrgUnits. One tool per consumed operation, routed
      inline through this capability's consumes block.
    tools:
    - name: list-organizational-units
      description: List Organizational Units
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-sdk-directory-orgunits.listorgunits
      with:
        type: tools.type
        orgUnitPath: tools.orgUnitPath
      outputParameters:
      - type: object
        mapping: $.
    - name: create-organizational-unit
      description: Create an Organizational Unit
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: admin-sdk-directory-orgunits.insertorgunit
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-organizational-unit
      description: Get an Organizational Unit
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-sdk-directory-orgunits.getorgunit
      outputParameters:
      - type: object
        mapping: $.
    - name: update-organizational-unit
      description: Update an Organizational Unit
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: admin-sdk-directory-orgunits.updateorgunit
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: patch-organizational-unit
      description: Patch an Organizational Unit
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: admin-sdk-directory-orgunits.patchorgunit
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-organizational-unit
      description: Delete an Organizational Unit
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: admin-sdk-directory-orgunits.deleteorgunit
      outputParameters:
      - type: object
        mapping: $.