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 a...
This record as markdown: /tools/design-doc-generator-mcp/save-design-doc.md
What save_design_doc does on Design Doc Generator
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | — | 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 | — | Absolute path to the project root. Defaults to the server's cwd. |
outputRelativePath | string | — | Relative path under docs/ to write to. Defaults to docs/<title-slug>.md. |
Parameters from the server's own tool schema.
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 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'
Attacks that exploit this kind of access
The rule that runs save_design_doc safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Design Doc Generator, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For save_design_doc, this is the rule to start with:
save_design_doc stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Design Doc Generator, apply this rule, and every save_design_doc call is checked against it from then on.
Questions about 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. It is categorised as a Write tool in the Design Doc Generator MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
save_design_doc accepts 4 parameters: title, markdown, projectRoot, outputRelativePath. Required: markdown. The full parameter table on this page comes from the server's own tool schema.
Register the Design Doc Generator MCP server in PolicyLayer and add a rule for save_design_doc: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Design Doc Generator. Nothing to install.
save_design_doc is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the save_design_doc rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for save_design_doc. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
save_design_doc is provided by the Design Doc Generator MCP server (design-doc-generator-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Design Doc Generator, and thousands of servers like it.
This server
Across the catalogue