Skip to content

MCP Resources ​

Dagu exposes MCP resources for DAG specs, Markdown Wiki pages, DAG-run details, scheduler and step logs, foreach items, and built-in references.

Resource URIs ​

URIMIME typeDescription
dagu://referenceapplication/jsonAvailable built-in MCP reference resources.
dagu://reference/authoringtext/markdownGuidance for writing and editing Dagu DAG YAML through MCP.
dagu://reference/toolstext/markdownCompact tool reference for dagu_read, dagu_change, and dagu_execute.
dagu://reference/read-tooltext/markdownDetailed dagu_read input, output, and error contract.
dagu://reference/change-tooltext/markdownDetailed dagu_change preview and apply contract.
dagu://reference/execute-tooltext/markdownDetailed dagu_execute input, output, and error contract.
dagu://reference/appstext/markdownInteractive run inspector behavior for MCP Apps hosts.
dagu://reference/notificationstext/markdownHow run-completion notifications work over MCP resources.
dagu://reference/feedbacktext/markdownHow to draft a Dagu bug, UX gap, or reference gap report for the user to submit.
dagu://dagsapplication/jsonDAG summaries visible to the caller.
dagu://dags?{+query}application/jsonDAG summaries filtered by a query string accepted by target=dags.
dagu://dags/{name}/specapplication/yamlCurrent YAML spec for a DAG.
dagu://wikiapplication/jsonWiki page tree across accessible workspaces.
dagu://wiki/{workspace}application/jsonWiki page tree for default or one named workspace.
dagu://wiki/{workspace}/{path}text/markdownCurrent Markdown content for one Wiki page.
dagu://runsapplication/jsonDAG-run summaries visible to the caller.
dagu://runs?{+query}application/jsonDAG-run summaries filtered by a query string accepted by target=runs. status may repeat.
dagu://runs/{name}/{dagRunId}application/jsonCurrent DAG-run details under dagRunDetails, with the run's outputs beside it.
dagu://runs/{name}/{dagRunId}/logsapplication/jsonScheduler log and step log metadata.
dagu://runs/{name}/{dagRunId}/steps/{stepName}/logsapplication/jsonStandard output and standard error for one step.
dagu://runs/{name}/{dagRunId}/sub/{subRunId}application/jsonCurrent details for a child DAG run addressed under its root run, with its outputs, as for run details.
dagu://runs/{name}/{dagRunId}/sub/{subRunId}/steps/{stepName}/logsapplication/jsonStandard output and standard error for one child-run step.
dagu://runs/{name}/{dagRunId}/steps/{stepName}/foreachapplication/jsonItems of a foreach step, with the status each body run reached. Supports parent, status, page, and perPage.
dagu://runs/{name}/{dagRunId}/steps/{stepName}/foreach/{item}application/jsonOne item of a foreach step, with the status of each body step.
dagu://runs/{name}/{dagRunId}/steps/{stepName}/foreach/{item}/steps/{bodyStepName}/logsapplication/jsonStandard output and standard error for one body step of a foreach item.
ui://dagu/run-inspector/v10text/html;profile=mcp-appRun inspector app for MCP Apps hosts.

The server instructions tell a connected agent to read the authoring reference before writing or editing DAG YAML, and the feedback reference when Dagu misbehaves or its errors or references mislead. The feedback reference has the agent search existing issues, draft a redacted report with the server's Dagu version, and give the user a prefilled GitHub issue link. The user reviews and submits it; Dagu files nothing.

Use dagu_read with a uri to read any resource directly:

json
{ "uri": "dagu://reference/tools" }
json
{ "uri": "dagu://dags/nightly-report/spec" }

Wiki page resources use an explicit workspace so an identical path in two workspaces is unambiguous. Encode a nested Wiki page path as one URI segment:

text
dagu://wiki/operations/runbooks%2Frestart

The dagu_read list and search targets return these canonical URIs. dagu://wiki and workspace collection resources accept the same page, perPage, flat, sort, order, and prefix query parameters as target=wiki. Wiki page lists accept up to 200 entries per page.

The deprecated dagu://docs collection and page URIs still resolve through dagu_read with uri. They are not registered MCP resources, so resources/read does not accept them.

In tree mode, pagination selects direct children of the workspace or prefix; a returned directory still contains its descendants. In flat mode, pagination selects individual Wiki pages.

For example, this resource lists the newest individual Wiki pages below runbooks in the operations workspace:

text
dagu://wiki/operations?prefix=runbooks&flat=true&sort=mtime&order=desc&perPage=20

Collection resources accept the same query parameters as their corresponding dagu_read list target. Log resources accept bounded query parameters supported by Dagu's log readers. Run logs support tail from 1 to 10000:

text
dagu://runs/nightly-report/20260522T010000/logs?tail=100

Step logs support tail, head, offset, limit, and stream=stdout|stderr. Use at most one of tail, head, and offset; limit can be used alone or with offset, and by itself reads from the beginning. Without positioning parameters, the last 1000 lines are returned.

text
dagu://runs/nightly-report/20260522T010000/steps/generate-report/logs?stream=stderr&offset=101&limit=200

Child runs are addressed beneath the root run that created them:

text
dagu://runs/nightly-report/20260522T010000/sub/child-run-id

The foreach resources also exist under a child run, after sub/{subRunId}. A top-level foreach item is its index. A nested item is the body step's foreachParent, a dot, and the index.

Run Subscriptions ​

dagu_execute returns run and log resource links when a run can be identified.

Clients that support MCP resource subscriptions can subscribe to:

text
dagu://runs/{name}/{dagRunId}

Dagu sends a resource update notification when the run reaches a terminal state:

  • success
  • failed
  • aborted
  • partial success
  • rejected

Dagu also notifies when the run stops at a waiting checkpoint, and keeps watching the resource so the later terminal state is notified as well.

Clients without resource subscription support should poll dagu_read with target=run and the same name and dagRunId. Calls from Dagu Cloud under remote access have no subscriptions; use wait=true or read the run again.

MCP App Run Inspector ​

Hosts that support MCP Apps can render run-related dagu_read and dagu_execute results in an interactive inspector that shows run and step status, scheduler and per-step logs, and refresh, stop, and retry controls.

Built-in Prompts ​

Dagu also exposes MCP prompts for common workflows:

PromptArgumentsPurpose
dagu_create_daggoalDraft, validate, and apply a new DAG using Dagu's compact MCP tool surface.
dagu_edit_dagname, changeRead an existing DAG spec, make a scoped edit, preview validation, then apply.
dagu_create_wiki_pageworkspace, path, goalDraft, preview, and create a Markdown Wiki page.
dagu_edit_wiki_pageworkspace, path, changeRead a Markdown Wiki page, make a scoped edit, preview, then apply.
dagu_debug_failed_runname, dagRunIdRead a run and logs, explain the likely failure, then offer retry or stop when appropriate.

Dagu is open source under the GNU General Public License v3.0.