Skip to content

docs: document MCP support for documents - #31

Merged
yohamta0 merged 2 commits into
mainfrom
agent/add-mcp-documents-support
Aug 4, 2026
Merged

docs: document MCP support for documents#31
yohamta0 merged 2 commits into
mainfrom
agent/add-mcp-documents-support

Conversation

@yohamta0

@yohamta0 yohamta0 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • document dagu_read document list, read, and search targets
  • document dagu_change document upsert, rename, move, and delete operations
  • describe workspace-aware dagu://docs resources and document prompts
  • update MCP architecture and audit behavior for document operations

Testing

  • pnpm build

Companion to dagucloud/dagu#2495


Summary by cubic

Add docs for MCP document support: list/read/search Markdown with dagu_read, and create/update/rename/move/delete with dagu_change, using workspace-aware dagu://docs resources and new prompts. Architecture and audit docs now cover document stores, events, and that Markdown is never stored.

  • New Features
    • dagu_read adds docs, doc, and doc_search with workspace, path, and search; document URIs are canonical and support pagination/sort query params.
    • dagu_change adds upsert_doc, rename_doc, and delete_doc with preview (no write) and apply; examples clarify document preview with content.
    • New resources: dagu://docs, dagu://docs/{workspace}, dagu://docs/{workspace}/{path} with nested-path encoding.
    • New prompts: dagu_create_doc and dagu_edit_doc.
    • Architecture/audit: adds document store; resource_type=doc; document mutations emit normal domain events and notify the Web UI; document resources are read on demand.

Written for commit b9e683e. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Documentation
    • Introduced Markdown document support in MCP architecture with document stores and workspace-aware operations.
    • Added document reading, searching, and mutation capabilities through expanded tools and resource templates.
    • Extended resource URIs and built-in prompts to enable document creation and editing workflows within workspaces.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The MCP documentation now covers Markdown document resources, workspace-scoped reads, document creation and editing prompts, document mutations, architecture integration, and audit events.

Changes

MCP document support

Layer / File(s) Summary
Document resources and prompts
mcp/resources.md, mcp/architecture.md, mcp/index.md
The documentation defines workspace-aware document resource URIs, encoded paths, query parameters, document stores, and document authoring prompts.
Document read and change tools
mcp/tools.md, mcp/architecture.md
dagu_read supports document listing, retrieval, and search. dagu_change supports document upsert, rename, and delete operations with workspace and path inputs.
Auditability and server scope
mcp/auditability.md, mcp/index.md
Auditability guidance covers document resources, document paths, document mutations, and related audit events. The server description covers scoped edits across Dagu state and documents.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding MCP support for Markdown documents.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/add-mcp-documents-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@mcp/tools.md`:
- Around line 109-119: Update the heading above the JSON example to clearly
indicate that it is preview-only, since the request uses mode "preview" and does
not write a document. Keep the example payload unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 675a962e-9107-4113-8140-c434fa267340

📥 Commits

Reviewing files that changed from the base of the PR and between ffd0709 and a72ea37.

📒 Files selected for processing (5)
  • mcp/architecture.md
  • mcp/auditability.md
  • mcp/index.md
  • mcp/resources.md
  • mcp/tools.md

Comment thread mcp/tools.md Outdated
@yohamta0
yohamta0 merged commit a91c3a9 into main Aug 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant