Lists the labels used to tag the rows of media plans (name, hex color, order). In an account, the workspace's labels come first with inherited: true (they can be used on the account's campaigns but are managed from the workspace), then the account's own; include_inherited=false returns only the own ones. Use their ids in label_ids of media_planner.campaigns.create/update. Requires view access to the Media Planner.
Escopo
media_planner:read
Permissão
Ver o módulo
Tool do MCP
media_planner_labels_listNa superfície completa; na compacta, mb_execute_operation com id: "media_planner.labels.list".
Custo declarado: até 402 leituras e 0 escritas por chamada (contam na cota diária).
Parâmetros
include_inheritedbooleanqueryopcional
In an account, also the workspace labels it inherits (read-only there).
Creates a campaign label with a name (up to 80 characters) and an optional hex color (#rrggbb; default a color of the palette), placed last. A workspace's labels are inherited by its accounts. Up to 200 per organization (409 limit_reached, details.resource campaign_labels). Returns the label with its id. Requires full access to the Media Planner.
Escopo
media_planner:write
Permissão
Editar no módulo
Tool do MCP
media_planner_labels_createNa superfície completa; na compacta, mb_execute_operation com id: "media_planner.labels.create".
Custo declarado: até 1 leituras e 1 escritas por chamada (contam na cota diária).
Updates the name and/or the color (#rrggbb) of a campaign label of this organization, sent inside updates ({ label_id, updates: { name, color } }); the rows that use it keep it. An inherited label is 404 here: update it from the workspace. Returns the updated label. Requires full access to the Media Planner.
Escopo
media_planner:write
Permissão
Editar no módulo
Tool do MCP
media_planner_labels_updateNa superfície completa; na compacta, mb_execute_operation com id: "media_planner.labels.update".
Custo declarado: até 1 leituras e 1 escritas por chamada (contam na cota diária).
Parâmetros
label_idstringrotaobrigatório
Campaign label id (from media_planner.labels.list).
Sets the order of this organization's campaign labels: label_ids in the new order (position = index). All or nothing: an id that is not a label of this organization stops the whole reorder (404). Requires full access to the Media Planner.
Escopo
media_planner:write
Permissão
Editar no módulo
Tool do MCP
media_planner_labels_reorderNa superfície completa; na compacta, mb_execute_operation com id: "media_planner.labels.reorder".
Custo declarado: até 200 leituras e 200 escritas por chamada (contam na cota diária).
Parâmetros
label_idsarray<string>corpoobrigatório
The organization's label ids in the new order (from media_planner.labels.list).
Deletes a campaign label and removes it from every row that has it, in this organization and, for a workspace label, in the accounts the person can reach. The label goes to the 30-day trash; restoring it brings the label back and puts it back on those rows (the ones that still exist; the trash keeps up to 5,000 of them, and with more the trash item says linked_truncated and the dry run warns). The dry run says how many rows have it. Outside the app it needs a dry run and a confirm_token, except a REST DELETE with a key allowed to delete. Returns how many rows were updated. Requires full access to the Media Planner.
Com uma API key, este DELETE roda direto: o registro fica 30 dias na lixeira e a resposta traz o seu trash_item_id. Com um token OAuth, e pelo MCP, pede dry_run → confirm_token.
Escopo
media_planner:writee «Permitir exclusões» (media_planner:delete no OAuth)
Permissão
Editar no módulo
Tool do MCP
media_planner_labels_deleteNa superfície completa; na compacta, mb_execute_operation com id: "media_planner.labels.delete".
Custo declarado: até 1002 leituras e 1001 escritas por chamada (contam na cota diária).
Parâmetros
label_idstringrotaobrigatório
Campaign label id (from media_planner.labels.list).
Resposta
oktrue
Always true.
campaigns_updatednumber
Rows the label was taken off.
trash_item_idstring
The trash item this deletion left: the item_id of platform.trash.restore (POST /trash/{item_id}/restore). Missing if nothing went to the trash.
trash_item_idsarray<string>
Only when the deletion left more than one copy: all of them, the first being trash_item_id.
trash_expires_atnumber
When the copy leaves the trash for good (epoch ms): 30 days after the deletion.