# save_design_doc

Call this once with the finished markdown you drafted from prepare_design_doc's instructions. Writes docs/<title-slug>.md (adding a table of contents, splitting any oversized Mermaid diagrams, and applying consistent diagram styling) plus a beautified interactive HTML export alongside it - both always included, both available on the free tier. Re-running this for the same topic overwrites/updates the same files by design, rather than creating new ones each time.

Agent View of the PolicyLayer registry record for `save_design_doc`. HTML page: https://policylayer.com/tools/design-doc-generator-mcp/save-design-doc

## Facts

- Tool: `save_design_doc`
- Server: Design Doc Generator (`design-doc-generator-mcp`) — https://policylayer.com/tools/design-doc-generator-mcp.md
- Install: `npx -y design-doc-generator-mcp`
- Homepage: https://www.npmjs.com/package/design-doc-generator-mcp
- Risk category: Write (Medium risk)
- Registry record: grade B, identity unverified
- Server rate-limited: no
- Parameters: 4 (1 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | string | no | Document title. Defaults to the first H1 in the markdown. Used for the HTML export's <title> and to build the default filename (docs/<title-slug>.md) when outpu |
| `markdown` | string | yes | The complete, finished design doc as markdown. |
| `projectRoot` | string | no | Absolute path to the project root. Defaults to the server's cwd. |
| `outputRelativePath` | string | no | Relative path under docs/ to write to. Defaults to docs/<title-slug>.md. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "save_design_doc",
    "arguments": {
      "markdown": "<markdown>"
    }
  }
}
```

## Why save_design_doc is rated Medium

This tool creates and modifies files (markdown and HTML documents) in a reversible manner. The 'overwrites/updates' language indicates modification, not deletion. While it does create persistent artifacts, the changes are not irreversible in nature—files can be edited or removed afterward. This is fundamentally a Write operation.

From the tool's own definition: "Tool description states: 'Writes docs/<title-slug>.md' and 'beautified interactive HTML export alongside it' and 'Re-running this for the same topic overwrites/updates the same files by design'"

## Use case

AI agents use save_design_doc to create or update resources in Design Doc Generator, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Design Doc Generator environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Design Doc Generator:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "save_design_doc": {
      "limits": [
        {
          "counter": "save_design_doc_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Design Doc Generator (2)

- `prepare_design_doc` — Read — https://policylayer.com/tools/design-doc-generator-mcp/prepare-design-doc.md
- `activate_license` — Write — https://policylayer.com/tools/design-doc-generator-mcp/activate-license.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=design-doc-generator-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/design-doc-generator-mcp
