Skip to main content
Glama

discard_draft

Destructive

Discard unsaved draft changes on a content entry to revert to the last published version. Use to abandon draft edits without affecting the published version.

Instructions

Discard unsaved draft changes on a content entry, reverting to the last published version. This is only available on Strapi v5 which has a separate draft layer. On Strapi v4, this operation is not supported and will return an error. Use this when you want to abandon draft edits without affecting the currently published version.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
localeNoLocale of the draft to discard (e.g., 'en', 'fr'). Only needed for i18n-enabled types.
entry_idYesNumeric ID of the entry whose draft changes should be discarded
content_typeYesPlural API ID of the content type (e.g., 'articles', 'products')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate destructiveHint=true and readOnlyHint=false. The description adds value by explaining what gets destroyed (draft changes) and that the published version remains unaffected. It also reveals the Strapi v5 dependency. These additions justify a score above the baseline, but no further details on side effects or return behavior are provided.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two sentences, with the first sentence clearly stating the action and effect, and the second adding constraints and usage guidance. Every sentence earns its place; no unnecessary words. Structurally front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core behavior, version constraint, and usage scenario. An output schema exists, so return values need not be explained. However, it omits handling of edge cases (e.g., no draft to discard) and does not mention the locale parameter's context (only for i18n-enabled types), leaving minor gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description does not provide additional semantics beyond what the schema already states for each parameter; it only frames the parameters indirectly (e.g., 'unsaved draft changes'). No extra value is added to parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'discard' and the resource 'unsaved draft changes on a content entry', with the effect 'reverting to the last published version'. It distinguishes from sibling tools by specifying Strapi v5 exclusivity and contrasting with updating or creating entries.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use this when you want to abandon draft edits without affecting the currently published version', providing a clear use case. However, it does not explicitly name alternative tools (e.g., update_entry or publish_entry) for when-not scenarios, which prevents a score of 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alex2zimmermann-ux/strapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server