Portainer · Capability
PortainerCE API — websocket
PortainerCE API — websocket. 4 operations. Lead operation: Attach a websocket. Self-contained Naftiko capability covering one Portainer business surface.
What You Can Do
GET
Get
— Attach a websocket
/v1/websocket/attach
GET
Get
— Execute a websocket
/v1/websocket/exec
GET
Get
— Execute a websocket on kubectl shell pod
/v1/websocket/kubernetes-shell
GET
Get
— Execute a websocket on pod
/v1/websocket/pod
MCP Tools
attach-websocket
Attach a websocket
read-only
idempotent
execute-websocket
Execute a websocket
read-only
idempotent
execute-websocket-kubectl-shell-pod
Execute a websocket on kubectl shell pod
read-only
idempotent
execute-websocket-pod
Execute a websocket on pod
read-only
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: PortainerCE API — websocket
description: 'PortainerCE API — websocket. 4 operations. Lead operation: Attach a websocket. Self-contained Naftiko capability
covering one Portainer business surface.'
tags:
- Portainer
- websocket
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
PORTAINER_API_KEY: PORTAINER_API_KEY
capability:
consumes:
- type: http
namespace: portainer-websocket
baseUri: ''
description: PortainerCE API — websocket business capability. Self-contained, no shared references.
resources:
- name: websocket-attach
path: /websocket/attach
operations:
- name: get
method: GET
description: Attach a websocket
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: endpointId
in: query
type: integer
description: environment(endpoint) ID of the environment(endpoint) where the resource is located
required: true
- name: nodeName
in: query
type: string
description: node name
- name: token
in: query
type: string
description: JWT token used for authentication against this environment(endpoint)
required: true
- name: websocket-exec
path: /websocket/exec
operations:
- name: get
method: GET
description: Execute a websocket
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: endpointId
in: query
type: integer
description: environment(endpoint) ID of the environment(endpoint) where the resource is located
required: true
- name: nodeName
in: query
type: string
description: node name
- name: token
in: query
type: string
description: JWT token used for authentication against this environment(endpoint)
required: true
- name: websocket-kubernetes-shell
path: /websocket/kubernetes-shell
operations:
- name: get
method: GET
description: Execute a websocket on kubectl shell pod
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: endpointId
in: query
type: integer
description: environment(endpoint) ID of the environment(endpoint) where the resource is located
required: true
- name: token
in: query
type: string
description: JWT token used for authentication against this environment(endpoint)
required: true
- name: websocket-pod
path: /websocket/pod
operations:
- name: get
method: GET
description: Execute a websocket on pod
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: endpointId
in: query
type: integer
description: environment(endpoint) ID of the environment(endpoint) where the resource is located
required: true
- name: namespace
in: query
type: string
description: namespace where the container is located
required: true
- name: podName
in: query
type: string
description: name of the pod containing the container
required: true
- name: containerName
in: query
type: string
description: name of the container
required: true
- name: command
in: query
type: string
description: command to execute in the container
required: true
- name: token
in: query
type: string
description: JWT token used for authentication against this environment(endpoint)
required: true
exposes:
- type: rest
namespace: portainer-websocket-rest
port: 8080
description: REST adapter for PortainerCE API — websocket. One Spectral-compliant resource per consumed operation, prefixed
with /v1.
resources:
- path: /v1/websocket/attach
name: websocket-attach
description: REST surface for websocket-attach.
operations:
- method: GET
name: get
description: Attach a websocket
call: portainer-websocket.get
with:
endpointId: rest.endpointId
nodeName: rest.nodeName
token: rest.token
outputParameters:
- type: object
mapping: $.
- path: /v1/websocket/exec
name: websocket-exec
description: REST surface for websocket-exec.
operations:
- method: GET
name: get
description: Execute a websocket
call: portainer-websocket.get
with:
endpointId: rest.endpointId
nodeName: rest.nodeName
token: rest.token
outputParameters:
- type: object
mapping: $.
- path: /v1/websocket/kubernetes-shell
name: websocket-kubernetes-shell
description: REST surface for websocket-kubernetes-shell.
operations:
- method: GET
name: get
description: Execute a websocket on kubectl shell pod
call: portainer-websocket.get
with:
endpointId: rest.endpointId
token: rest.token
outputParameters:
- type: object
mapping: $.
- path: /v1/websocket/pod
name: websocket-pod
description: REST surface for websocket-pod.
operations:
- method: GET
name: get
description: Execute a websocket on pod
call: portainer-websocket.get
with:
endpointId: rest.endpointId
namespace: rest.namespace
podName: rest.podName
containerName: rest.containerName
command: rest.command
token: rest.token
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: portainer-websocket-mcp
port: 9090
transport: http
description: MCP adapter for PortainerCE API — websocket. One tool per consumed operation, routed inline through this
capability's consumes block.
tools:
- name: attach-websocket
description: Attach a websocket
hints:
readOnly: true
destructive: false
idempotent: true
call: portainer-websocket.get
with:
endpointId: tools.endpointId
nodeName: tools.nodeName
token: tools.token
outputParameters:
- type: object
mapping: $.
- name: execute-websocket
description: Execute a websocket
hints:
readOnly: true
destructive: false
idempotent: true
call: portainer-websocket.get
with:
endpointId: tools.endpointId
nodeName: tools.nodeName
token: tools.token
outputParameters:
- type: object
mapping: $.
- name: execute-websocket-kubectl-shell-pod
description: Execute a websocket on kubectl shell pod
hints:
readOnly: true
destructive: false
idempotent: true
call: portainer-websocket.get
with:
endpointId: tools.endpointId
token: tools.token
outputParameters:
- type: object
mapping: $.
- name: execute-websocket-pod
description: Execute a websocket on pod
hints:
readOnly: true
destructive: false
idempotent: true
call: portainer-websocket.get
with:
endpointId: tools.endpointId
namespace: tools.namespace
podName: tools.podName
containerName: tools.containerName
command: tools.command
token: tools.token
outputParameters:
- type: object
mapping: $.