naftiko: 1.0.0-alpha2 info: label: PortainerCE API — edge_stacks description: 'PortainerCE API — edge_stacks. 10 operations. Lead operation: Fetches the list of EdgeStacks. Self-contained Naftiko capability covering one Portainer business surface.' tags: - Portainer - edge_stacks created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: PORTAINER_API_KEY: PORTAINER_API_KEY capability: consumes: - type: http namespace: portainer-edge-stacks baseUri: '' description: PortainerCE API — edge_stacks business capability. Self-contained, no shared references. resources: - name: edge_stacks path: /edge_stacks operations: - name: edgestacklist method: GET description: Fetches the list of EdgeStacks outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: summarizeStatuses in: query type: boolean description: will summarize the statuses - name: edge_stacks-create-file path: /edge_stacks/create/file operations: - name: edgestackcreatefile method: POST description: Create an EdgeStack from file outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Name in: formData type: string description: Name of the stack. it must only consist of lowercase alphanumeric characters, hyphens, or underscores as well as start with a letter or number required: true - name: file in: formData type: file description: Content of the Stack file required: true - name: EdgeGroups in: formData type: string description: JSON stringified array of Edge Groups ids required: true - name: DeploymentType in: formData type: integer description: deploy type 0 - 'compose', 1 - 'kubernetes' required: true - name: Registries in: formData type: string description: JSON stringified array of Registry ids to use for this stack - name: UseManifestNamespaces in: formData type: boolean description: Uses the manifest's namespaces instead of the default one, relevant only for kube environments - name: PrePullImage in: formData type: boolean description: Pre Pull image - name: RetryDeploy in: formData type: boolean description: Retry deploy - name: dryrun in: query type: string description: if true, will not create an edge stack, but just will check the settings and return a non-persisted edge stack object - name: edge_stacks-create-repository path: /edge_stacks/create/repository operations: - name: edgestackcreaterepository method: POST description: Create an EdgeStack from a git repository outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: string description: stack config required: true - name: dryrun in: query type: string description: if true, will not create an edge stack, but just will check the settings and return a non-persisted edge stack object - name: edge_stacks-create-string path: /edge_stacks/create/string operations: - name: edgestackcreatestring method: POST description: Create an EdgeStack from a text outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: string description: stack config required: true - name: dryrun in: query type: string description: if true, will not create an edge stack, but just will check the settings and return a non-persisted edge stack object - name: edge_stacks-id path: /edge_stacks/{id} operations: - name: edgestackdelete method: DELETE description: Delete an EdgeStack outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: EdgeStack Id required: true - name: edgestackinspect method: GET description: Inspect an EdgeStack outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: EdgeStack Id required: true - name: edgestackupdate method: PUT description: Update an EdgeStack outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: EdgeStack Id required: true - name: body in: body type: string description: EdgeStack data required: true - name: edge_stacks-id-file path: /edge_stacks/{id}/file operations: - name: edgestackfile method: GET description: Fetches the stack file for an EdgeStack outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: EdgeStack Id required: true - name: edge_stacks-id-status path: /edge_stacks/{id}/status operations: - name: edgestackstatusupdate method: PUT description: Update an EdgeStack status outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: EdgeStack Id required: true - name: body in: body type: string description: EdgeStack status payload required: true - name: endpoints-id-edge-stacks-stackId path: /endpoints/{id}/edge/stacks/{stackId} operations: - name: get method: GET description: Inspect an Edge Stack for an Environment(Endpoint) outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: environment(endpoint) Id required: true - name: stackId in: path type: integer description: EdgeStack Id required: true exposes: - type: rest namespace: portainer-edge-stacks-rest port: 8080 description: REST adapter for PortainerCE API — edge_stacks. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/edge-stacks name: edge-stacks description: REST surface for edge_stacks. operations: - method: GET name: edgestacklist description: Fetches the list of EdgeStacks call: portainer-edge-stacks.edgestacklist with: summarizeStatuses: rest.summarizeStatuses outputParameters: - type: object mapping: $. - path: /v1/edge-stacks/create/file name: edge-stacks-create-file description: REST surface for edge_stacks-create-file. operations: - method: POST name: edgestackcreatefile description: Create an EdgeStack from file call: portainer-edge-stacks.edgestackcreatefile with: Name: rest.Name file: rest.file EdgeGroups: rest.EdgeGroups DeploymentType: rest.DeploymentType Registries: rest.Registries UseManifestNamespaces: rest.UseManifestNamespaces PrePullImage: rest.PrePullImage RetryDeploy: rest.RetryDeploy dryrun: rest.dryrun outputParameters: - type: object mapping: $. - path: /v1/edge-stacks/create/repository name: edge-stacks-create-repository description: REST surface for edge_stacks-create-repository. operations: - method: POST name: edgestackcreaterepository description: Create an EdgeStack from a git repository call: portainer-edge-stacks.edgestackcreaterepository with: body: rest.body dryrun: rest.dryrun outputParameters: - type: object mapping: $. - path: /v1/edge-stacks/create/string name: edge-stacks-create-string description: REST surface for edge_stacks-create-string. operations: - method: POST name: edgestackcreatestring description: Create an EdgeStack from a text call: portainer-edge-stacks.edgestackcreatestring with: body: rest.body dryrun: rest.dryrun outputParameters: - type: object mapping: $. - path: /v1/edge-stacks/{id} name: edge-stacks-id description: REST surface for edge_stacks-id. operations: - method: DELETE name: edgestackdelete description: Delete an EdgeStack call: portainer-edge-stacks.edgestackdelete with: id: rest.id outputParameters: - type: object mapping: $. - method: GET name: edgestackinspect description: Inspect an EdgeStack call: portainer-edge-stacks.edgestackinspect with: id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: edgestackupdate description: Update an EdgeStack call: portainer-edge-stacks.edgestackupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/edge-stacks/{id}/file name: edge-stacks-id-file description: REST surface for edge_stacks-id-file. operations: - method: GET name: edgestackfile description: Fetches the stack file for an EdgeStack call: portainer-edge-stacks.edgestackfile with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/edge-stacks/{id}/status name: edge-stacks-id-status description: REST surface for edge_stacks-id-status. operations: - method: PUT name: edgestackstatusupdate description: Update an EdgeStack status call: portainer-edge-stacks.edgestackstatusupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/endpoints/{id}/edge/stacks/{stackid} name: endpoints-id-edge-stacks-stackid description: REST surface for endpoints-id-edge-stacks-stackId. operations: - method: GET name: get description: Inspect an Edge Stack for an Environment(Endpoint) call: portainer-edge-stacks.get with: id: rest.id stackId: rest.stackId outputParameters: - type: object mapping: $. - type: mcp namespace: portainer-edge-stacks-mcp port: 9090 transport: http description: MCP adapter for PortainerCE API — edge_stacks. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: fetches-list-edgestacks description: Fetches the list of EdgeStacks hints: readOnly: true destructive: false idempotent: true call: portainer-edge-stacks.edgestacklist with: summarizeStatuses: tools.summarizeStatuses outputParameters: - type: object mapping: $. - name: create-edgestack-file description: Create an EdgeStack from file hints: readOnly: false destructive: false idempotent: false call: portainer-edge-stacks.edgestackcreatefile with: Name: tools.Name file: tools.file EdgeGroups: tools.EdgeGroups DeploymentType: tools.DeploymentType Registries: tools.Registries UseManifestNamespaces: tools.UseManifestNamespaces PrePullImage: tools.PrePullImage RetryDeploy: tools.RetryDeploy dryrun: tools.dryrun outputParameters: - type: object mapping: $. - name: create-edgestack-git-repository description: Create an EdgeStack from a git repository hints: readOnly: false destructive: false idempotent: false call: portainer-edge-stacks.edgestackcreaterepository with: body: tools.body dryrun: tools.dryrun outputParameters: - type: object mapping: $. - name: create-edgestack-text description: Create an EdgeStack from a text hints: readOnly: false destructive: false idempotent: false call: portainer-edge-stacks.edgestackcreatestring with: body: tools.body dryrun: tools.dryrun outputParameters: - type: object mapping: $. - name: delete-edgestack description: Delete an EdgeStack hints: readOnly: false destructive: true idempotent: true call: portainer-edge-stacks.edgestackdelete with: id: tools.id outputParameters: - type: object mapping: $. - name: inspect-edgestack description: Inspect an EdgeStack hints: readOnly: true destructive: false idempotent: true call: portainer-edge-stacks.edgestackinspect with: id: tools.id outputParameters: - type: object mapping: $. - name: update-edgestack description: Update an EdgeStack hints: readOnly: false destructive: false idempotent: true call: portainer-edge-stacks.edgestackupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: fetches-stack-file-edgestack description: Fetches the stack file for an EdgeStack hints: readOnly: true destructive: false idempotent: true call: portainer-edge-stacks.edgestackfile with: id: tools.id outputParameters: - type: object mapping: $. - name: update-edgestack-status description: Update an EdgeStack status hints: readOnly: false destructive: false idempotent: true call: portainer-edge-stacks.edgestackstatusupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: inspect-edge-stack-environment-endpoint description: Inspect an Edge Stack for an Environment(Endpoint) hints: readOnly: true destructive: false idempotent: true call: portainer-edge-stacks.get with: id: tools.id stackId: tools.stackId outputParameters: - type: object mapping: $.