Skip to content

MCP Tools Reference ​

Purpose ​

The exact tools an AI client can call over MCP, what each one takes, and what comes back. Tools are the only way an assistant touches your Dokman data - there is no blanket API access behind them.

For the setup flow, see Connect an AI Assistant.


How a tool call works ​

  1. The client sends the tool name and its arguments.
  2. Dokman checks the grant: which workspace, which scopes, and whether your account can reach the target.
  3. On success you get a JSON payload. On a refusal you get a JSON payload with a code and a message - the call itself succeeds, the action doesn't.
  4. Every call, allowed or refused, is written to the audit log.

Read tools ​

Available to every grant, including read-only ones.

ToolWhat it doesParameters
dokman_list_projectsLists the projects your account can seelimit (1-100, default 50), offset
dokman_list_servicesLists apps, Compose stacks, and databasesprojectId, kind (app / compose / database / all), query (max 120 chars), limit, offset
dokman_get_serviceLooks up one service by idserviceId, kind (accepted, unused)
dokman_list_deploymentsLists deployments, newest firstserviceId, status (success / failed / running / cancelled), limit, offset
dokman_get_deployment_logsFetches the log of one deploymentdeploymentId, tail (1-2000, default 500)
dokman_get_service_logsFetches recent logs of one serviceserviceId, tail
dokman_server_healthChecks that the linked Dokploy server is reachablenone
dokman_list_notificationsLists this workspace's notification historylimit, offset, since

Deploy tools ​

Need the deploy scope. Without it the call is refused with insufficient_scope; on the read-only endpoint (/mcp/readonly) they are not offered at all.

ToolWhat it doesParameters
dokman_deploy_serviceStarts a deployment for a serviceserviceId
dokman_rebuild_serviceRebuilds a service without cacheserviceId
dokman_restart_serviceRestarts a service (no deployment is created)serviceId
dokman_cancel_deploymentCancels a running deploymentdeploymentId
dokman_redeploy_composeRedeploys a Compose stackcomposeId

Note:

  • These are destructive. The client is told to confirm with you first, but the check that matters is your grant - a client with the deploy scope can act on any service you can act on.
  • Deploy and rebuild can only target services you already have access to. A service in another project comes back as NO_ACCESS.

Result shapes ​

ShapeComes from
{ items, truncated, nextOffset }The three list tools - pass nextOffset back as offset to continue
{ id, name, kind, status, projectId, projectName }dokman_get_service
{ deploymentId, lines, truncated }The two log tools - logs are ANSI-stripped and cut at tail
{ serverId, url, reachable, projectCount, serviceCount, checkedAt }dokman_server_health
{ serviceId, kind, deploymentId, status }Deploy, rebuild, and Compose redeploy
{ deploymentId, status: "cancelled" }dokman_cancel_deployment
{ serviceId, status: "restarted" }dokman_restart_service

Note:

  • A deploy can come back as pending: true with a note instead of a deployment ID. Dokploy reports nothing for the trigger itself, so the ID is read back from deployment history a moment later - the client is told to poll dokman_list_deployments.

Error codes ​

CodeWhat it meansTry this
NO_ACCESSThe service isn't in your account's scopeCheck the project in Dokploy - if you can't see it there, the assistant can't either
NOT_FOUNDThe service or deployment doesn't exist hereRe-read the list; the ID may be from another workspace
REQUIRES_REAUTHYour Dokploy login expired or was rejectedSign in again in Dokman, then retry
DOKPLOY_UNREACHABLEYour Dokploy server didn't answerCheck the server is up and reachable, then retry
insufficient_scopeThe grant is read-only and the tool needs deployReconnect with the Deploy toggle on
401 / invalid_tokenThe pass expired, was revoked, or the client lost itRemove and re-add the server in the client
400 (missing session)The client skipped the handshakeThe client re-initializes and continues
404 (unknown session)The session endedThe client re-initializes and continues
405Something tried to open a stream - only POST is servedUse a client that speaks streamable HTTP
429Too many requestsWait and retry - the limit is per token, not per IP

Limits ​

  • One workspace per grant - a client connected to one workspace can't reach another.
  • Access pass: 1 hour. It refreshes silently, for up to 30 days, without asking you again.
  • Page size: 100 items at most, 50 by default. Log tail: 2000 lines at most, 500 by default.
  • Sessions last 60 minutes on the client side; a dead session is re-created automatically.
  • Rate limits are counted per token, so one chatty assistant never blocks the others.

Error Handling and Edge Cases ​

ScenarioSystem Behavior
A read tool returns NO_ACCESSThe target is outside your Dokploy access - the grant can't widen it
A list comes back with truncated: trueMore items exist - page with nextOffset
Logs come back with truncated: trueThe log was longer than tail - raise tail up to 2000
A deploy returns pending: trueThe deployment is registered but not listed yet - poll dokman_list_deployments
dokman_server_health returns DOKPLOY_UNREACHABLEYour Dokploy is down or unreachable - nothing will deploy until it is back
The client sees no deploy tools at allIt is pointed at the read-only endpoint (/mcp/readonly)
Two deploys land close togetherBoth may resolve to the same newest row - list the deployments to tell them apart

Released under the Dokman license. English only.