FOSSology · Capability

FOSSology API — Folders

FOSSology API — Folders. 9 operations. Lead operation: Get the list of accessible folders. Self-contained Naftiko capability covering one Fossology business surface.

Run with Naftiko FossologyFolders

What You Can Do

GET
Getfolders — Get the list of accessible folders
/v1/folders
POST
Createfolder — Create a new folder
/v1/folders
PUT
Unlinkcontent — Unlink a content from a folder
/v1/folders/contents/{contentid}/unlink
GET
Getfolderbyid — Get a single folder details
/v1/folders/{id}
DELETE
Deletefolderbyid — Delete a folder
/v1/folders/{id}
PATCH
Patchfolderbyid — Edit a folder's description
/v1/folders/{id}
PUT
Movefolderbyid — Copy/Move a folder
/v1/folders/{id}
GET
Getallfoldercontents — Get all contents of a folder
/v1/folders/{id}/contents
GET
Getunlinkablecontents — Get contents of a folder which can be unlinked
/v1/folders/{id}/contents/unlinkable

MCP Tools

get-list-accessible-folders

Get the list of accessible folders

read-only idempotent
create-new-folder

Create a new folder

unlink-content-folder

Unlink a content from a folder

idempotent
get-single-folder-details

Get a single folder details

read-only idempotent
delete-folder

Delete a folder

idempotent
edit-folder-s-description

Edit a folder's description

idempotent
copy-move-folder

Copy/Move a folder

idempotent
get-all-contents-folder

Get all contents of a folder

read-only idempotent
get-contents-folder-which-can

Get contents of a folder which can be unlinked

read-only idempotent

Capability Spec

fossology-folders.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: FOSSology API — Folders
  description: 'FOSSology API — Folders. 9 operations. Lead operation: Get the list of accessible folders. Self-contained
    Naftiko capability covering one Fossology business surface.'
  tags:
  - Fossology
  - Folders
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    FOSSOLOGY_API_KEY: FOSSOLOGY_API_KEY
capability:
  consumes:
  - type: http
    namespace: fossology-folders
    baseUri: http://localhost/repo/api/v1
    description: FOSSology API — Folders business capability. Self-contained, no shared references.
    resources:
    - name: folders
      path: /folders
      operations:
      - name: getfolders
        method: GET
        description: Get the list of accessible folders
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createfolder
        method: POST
        description: Create a new folder
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: parentFolder
          in: header
          type: integer
          description: Parent folder for the new folder
          required: true
        - name: folderName
          in: header
          type: string
          description: Name of the new folder
          required: true
        - name: folderDescription
          in: header
          type: string
          description: Description of the new folder
    - name: folders-contents-contentId-unlink
      path: /folders/contents/{contentId}/unlink
      operations:
      - name: unlinkcontent
        method: PUT
        description: Unlink a content from a folder
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: folders-id
      path: /folders/{id}
      operations:
      - name: getfolderbyid
        method: GET
        description: Get a single folder details
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: deletefolderbyid
        method: DELETE
        description: Delete a folder
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: patchfolderbyid
        method: PATCH
        description: Edit a folder's description
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: header
          type: string
          description: New name of the folder
        - name: description
          in: header
          type: string
          description: New description of the folder
      - name: movefolderbyid
        method: PUT
        description: Copy/Move a folder
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: parent
          in: header
          type: integer
          description: New parent folder id
          required: true
        - name: action
          in: header
          type: string
          description: Action to be performed
          required: true
    - name: folders-id-contents
      path: /folders/{id}/contents
      operations:
      - name: getallfoldercontents
        method: GET
        description: Get all contents of a folder
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: folders-id-contents-unlinkable
      path: /folders/{id}/contents/unlinkable
      operations:
      - name: getunlinkablecontents
        method: GET
        description: Get contents of a folder which can be unlinked
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.FOSSOLOGY_API_KEY}}'
  exposes:
  - type: rest
    namespace: fossology-folders-rest
    port: 8080
    description: REST adapter for FOSSology API — Folders. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/folders
      name: folders
      description: REST surface for folders.
      operations:
      - method: GET
        name: getfolders
        description: Get the list of accessible folders
        call: fossology-folders.getfolders
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createfolder
        description: Create a new folder
        call: fossology-folders.createfolder
        with:
          parentFolder: rest.parentFolder
          folderName: rest.folderName
          folderDescription: rest.folderDescription
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/folders/contents/{contentid}/unlink
      name: folders-contents-contentid-unlink
      description: REST surface for folders-contents-contentId-unlink.
      operations:
      - method: PUT
        name: unlinkcontent
        description: Unlink a content from a folder
        call: fossology-folders.unlinkcontent
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/folders/{id}
      name: folders-id
      description: REST surface for folders-id.
      operations:
      - method: GET
        name: getfolderbyid
        description: Get a single folder details
        call: fossology-folders.getfolderbyid
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletefolderbyid
        description: Delete a folder
        call: fossology-folders.deletefolderbyid
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: patchfolderbyid
        description: Edit a folder's description
        call: fossology-folders.patchfolderbyid
        with:
          name: rest.name
          description: rest.description
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: movefolderbyid
        description: Copy/Move a folder
        call: fossology-folders.movefolderbyid
        with:
          parent: rest.parent
          action: rest.action
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/folders/{id}/contents
      name: folders-id-contents
      description: REST surface for folders-id-contents.
      operations:
      - method: GET
        name: getallfoldercontents
        description: Get all contents of a folder
        call: fossology-folders.getallfoldercontents
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/folders/{id}/contents/unlinkable
      name: folders-id-contents-unlinkable
      description: REST surface for folders-id-contents-unlinkable.
      operations:
      - method: GET
        name: getunlinkablecontents
        description: Get contents of a folder which can be unlinked
        call: fossology-folders.getunlinkablecontents
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: fossology-folders-mcp
    port: 9090
    transport: http
    description: MCP adapter for FOSSology API — Folders. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-list-accessible-folders
      description: Get the list of accessible folders
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: fossology-folders.getfolders
      outputParameters:
      - type: object
        mapping: $.
    - name: create-new-folder
      description: Create a new folder
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: fossology-folders.createfolder
      with:
        parentFolder: tools.parentFolder
        folderName: tools.folderName
        folderDescription: tools.folderDescription
      outputParameters:
      - type: object
        mapping: $.
    - name: unlink-content-folder
      description: Unlink a content from a folder
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: fossology-folders.unlinkcontent
      outputParameters:
      - type: object
        mapping: $.
    - name: get-single-folder-details
      description: Get a single folder details
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: fossology-folders.getfolderbyid
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-folder
      description: Delete a folder
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: fossology-folders.deletefolderbyid
      outputParameters:
      - type: object
        mapping: $.
    - name: edit-folder-s-description
      description: Edit a folder's description
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: fossology-folders.patchfolderbyid
      with:
        name: tools.name
        description: tools.description
      outputParameters:
      - type: object
        mapping: $.
    - name: copy-move-folder
      description: Copy/Move a folder
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: fossology-folders.movefolderbyid
      with:
        parent: tools.parent
        action: tools.action
      outputParameters:
      - type: object
        mapping: $.
    - name: get-all-contents-folder
      description: Get all contents of a folder
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: fossology-folders.getallfoldercontents
      outputParameters:
      - type: object
        mapping: $.
    - name: get-contents-folder-which-can
      description: Get contents of a folder which can be unlinked
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: fossology-folders.getunlinkablecontents
      outputParameters:
      - type: object
        mapping: $.