DocuWriter.ai MCP tool reference

DocuWriter.ai exposes 18 MCP tools for documentation generation, Space search, document management, repository sync review, audit logs, and feedback.

Use numeric Space IDs when working with a specific Space. Start with list-spaces if you do not know the ID, then confirm the target Space before running write actions.


Before you use MCP actions

MCP tools run from an external assistant such as ChatGPT, Claude Code, Cursor, VS Code, or Codex. The exact confirmation screen depends on the assistant you are using.

Read-only tools are useful for browsing and discovery. Write tools can create, update, delete, apply changes, or submit feedback after you approve the action in your MCP client. Always review the target Space, document, suggestion, and content before approving a write action.

For the in-app Platform AI Agent approval flow, see Agent actions and approvals.

MCP does not replace setup flows that require an external account, browser authorization, billing portal, or provider permissions. For those workflows, use the relevant DocuWriter.ai page and follow the on-screen steps.


User and Space discovery

get-user-info

Returns the authenticated user's display name and whether the account can use generation tools.

Parameters: none.

Typical response:

{
  "success": true,
  "data": {
    "name": "DW",
    "can_generate": true
  }
}

Use this to confirm authentication and generation availability.

list-spaces

Lists Spaces returned for the authenticated account.

Parameters: none.

Returns Space IDs, names, public/private status, timestamps, and item counts.

list-space-documents

Lists documents and folders in a specific Space.

Parameters:

  • space_id: required, numeric Space ID

Use this to browse a Space, discover document IDs, and understand folder structure.

search-space-documents

Searches documents inside one Space.

Parameters:

  • space_id: required, numeric Space ID
  • query: required, minimum 2 characters
  • page: optional
  • per_page: optional, max 100
  • highlight: optional boolean

Use this before creating new pages so you can update existing documentation when appropriate.

global-search

Searches across documentation Spaces available to the authenticated account.

Parameters:

  • query: required, minimum 2 characters
  • per_page: optional, default 20, max 100

Use this when you do not know which Space contains the document.


Document management

These tools can change Space content. Review the target document carefully before approving a write action in your MCP client.

create-space-document

Creates a new document in a Space.

Parameters:

  • space_id: required, numeric Space ID
  • title: required
  • content: required Markdown/plain text
  • parent_id: optional folder ID
  • path: optional folder path, such as docs/api; folders are created if needed

Use this to add new documentation pages. Send Markdown in content; no type field is needed for creation.

get-space-document

Retrieves a document's content and metadata.

Parameters:

  • space_id: required, numeric Space ID
  • document_id: required

Use this before editing a document.

update-space-document

Updates an existing document.

Parameters:

  • space_id: required, numeric Space ID
  • document_id: required
  • title: optional
  • content: optional Markdown/plain text
  • type: optional, blank or markdown
  • parent_id: optional, use null to move to root

Send Markdown in content. type: markdown is optional and can be omitted.

delete-space-document

Deletes a document from a Space.

Parameters:

  • space_id: required, numeric Space ID
  • document_id: required

This is destructive. Confirm the Space and document ID before approving the action.


Code generation

generate-code-documentation

Generates documentation for one or more source-code files and returns Markdown text.

Parameters:

  • files: required array of objects with filename and source_code
  • output_language: optional
  • documentation_type: optional
  • additional_instructions: optional
  • name: optional custom generation name

Use this when you want generated documentation returned to the assistant before deciding where to save it.

generate-and-add-documentation

Generates code documentation and saves it to a Space in one step.

Parameters:

  • space_id: required, numeric Space ID
  • files: required array of objects with filename and source_code
  • title: required document title
  • output_language: optional
  • documentation_type: optional
  • additional_instructions: optional
  • name: optional custom generation name
  • parent_id: optional folder ID
  • path: optional folder path

Use this when the target Space and page are already clear.

generate-code-comments

Generates DocBlock/JSDoc-style comments for source code.

Parameters:

  • source_code: required
  • filename: required
  • name: optional custom generation name

generate-code-optimization

Generates an optimized/refactored version of source code.

Parameters:

  • source_code: required
  • filename: required
  • optimization_focus: optional, such as performance, readability, security, or maintainability
  • additional_instructions: optional
  • name: optional custom generation name

generate-code-tests

Generates tests for source code.

Parameters:

  • source_code: required
  • filename: required
  • test_framework: optional, such as PHPUnit, Pest, Jest, Vitest, Pytest, JUnit
  • test_type: optional, such as unit, integration, API
  • additional_instructions: optional
  • name: optional custom generation name

Generation tools create a generation and return output. Only generate-and-add-documentation saves generated documentation to a Space.


Repository sync and audit

list-space-suggestions

Lists repository sync documentation suggestions for a Space.

Parameters:

  • space_id: required, numeric Space ID
  • batch_id: optional
  • status: optional, default pending; supported values include pending, applied, and discarded
  • limit: optional, default 50, max 200

Requires management access to the Space.

apply-space-suggestion

Applies one pending repository sync suggestion, writes its content to the target page, and marks the suggestion as applied.

Parameters:

  • suggestion_id: required

Requires management access to the suggestion's Space. Non-pending suggestions cannot be applied again. Applied suggestions can be reviewed through activity and audit surfaces available on your plan.

get-space-activity-log

Retrieves the audit log for a DocuWriter.ai Space.

Parameters:

  • space_id: required, numeric Space ID
  • limit: optional, default 50, max 500
  • since: optional ISO 8601 datetime

Requires management access and an Enterprise-tier Space owner or team. Non-Enterprise Spaces return an upgrade prompt.


Feedback

report-feedback

Submits product or MCP integration feedback to DocuWriter.ai.

Parameters:

  • feedback: required, detailed feedback text

Use this only for feedback related to DocuWriter.ai or its MCP integration. This submits feedback to DocuWriter.ai and cannot be undone by MCP.


Common workflows

Find and update an existing page

  1. Run list-spaces.
  2. Run search-space-documents with the numeric space_id.
  3. Run get-space-document for the matching document.
  4. Review the content.
  5. Run update-space-document with the updated Markdown content.

Generate and save documentation

  1. Run list-spaces to find the target space_id.
  2. Run generate-and-add-documentation with the target Space and files.
  3. Review the created page in DocuWriter.ai.

Review repository sync suggestions

  1. Run list-space-suggestions for the target space_id.
  2. Review the returned suggestion summaries and confidence scores.
  3. Run apply-space-suggestion for the specific suggestion to apply.
  4. Review the updated page in DocuWriter.ai.

Audit Space activity

  1. Confirm the Space is on a plan that includes activity logs.
  2. Run get-space-activity-log with the target space_id.
  3. Use since for incremental reviews.