Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview
On this page

brand_delete

Delete a brand and the context authored on it, guarded by base_revision.

Deletes a Brand and all the context written on it. Guarded by base_revision — the revision you last read via brand_get — so a brand someone just edited can’t be removed out from under them.

Input

Field Type Required Description
brand_name string yes The slug identifying which brand to delete.
base_revision number yes The revision you last read. Guards concurrent edits.

Output

{ deleted: true, slug }.

Example

brand_get({ brand_name: 'acme-running' }); // → revision 4
brand_delete({ brand_name: 'acme-running', base_revision: 4 });
// → { deleted: true, slug: 'acme-running' }

Requires the brand:write scope.

Reference

Delete a brand and all the context authored on it. Pass base_revision (from brand_get) — the delete is rejected if the brand changed since you read it. The slug becomes free to re-use afterwards.

Input

Argument Type Required Description
base_revision integer yes The revision you last read via brand_get. Guards against deleting a concurrently-edited brand.
brand_name string yes The brand slug identifying which brand to delete.

Failure codes

A failed call has isError set, and structuredContent.error holds one of these codes. Errors describes the shape of a failed call.

  • not_found
  • revision_mismatch
  • forbidden
  • invalid_request
  • internal_error

Scope

The token must hold brand:write. Auth & scopes lists each scope.

Annotations

A client reads these hints. A hint that the tool does not declare has the default value of the MCP specification.

  • Writes. The tool can change data.
  • Destructive. The tool can make a change that you cannot undo. A client can ask you to confirm before it calls the tool.
  • Not idempotent. A second call with the same arguments can change more.
  • Closed world. The tool reads and writes the data of AdCrunch only.

Was this page helpful?