Lists all the workspace's custom metrics (from an account, its workspace's; up to 50), by name: formula and its readable text, format (number, currency, percent), decimals, whether higher is better, platforms, is_blended (more than one platform: usable in KPIs and charts, not in tables) and who created it (created_by_id, created_by_name). Widgets reference a custom metric by its public_id (custom:<id>).
Escopo
dashboards:read
Permissão
Ver o módulo
Tool do MCP
dashboards_custom_metrics_listNa superfície completa; na compacta, mb_execute_operation com id: "dashboards.custom_metrics.list".
Custo declarado: até 51 leituras e 0 escritas por chamada (contam na cota diária).
Creates a custom metric in the workspace (not in an account: workspace_only) with a unique name (max 60), optional description, formula, format, decimals (0-4) and higher_is_better. The formula is a tree: {kind: 'metric', metric_id, platform} (a metric id of that platform's registry, numeric), {kind: 'constant', value}, {kind: 'binary', op: '+'|'-'|'*'|'/', left, right} or {kind: 'group', child} (parentheses); up to 20 metrics and 12 levels, never another custom metric. Up to 50 per workspace. Returns the new id; widgets use custom:<id>. Requires edit access to Dashboards in the workspace.
Escopo
dashboards:write
Permissão
Editar no módulo
Tool do MCP
dashboards_custom_metrics_createNa superfície completa; na compacta, mb_execute_operation com id: "dashboards.custom_metrics.create".
Custo declarado: até 51 leituras e 1 escritas por chamada (contam na cota diária).
Parâmetros
namestringcorpoobrigatório
A unique name in the workspace (up to 60 characters).
formulaanycorpoobrigatório
The formula, as a tree of nodes (see the operation's description).
Updates any of the name, description (empty clears it), formula, format, decimals and higher_is_better of a workspace custom metric; what is not sent is kept. The formula is a tree: {kind: 'metric', metric_id, platform} (a metric id of that platform's registry, numeric), {kind: 'constant', value}, {kind: 'binary', op: '+'|'-'|'*'|'/', left, right} or {kind: 'group', child} (parentheses); up to 20 metrics and 12 levels, never another custom metric. Every widget that uses it shows the new definition. Returns the updated metric. Requires edit access to Dashboards in the workspace.
Escopo
dashboards:write
Permissão
Editar no módulo
Tool do MCP
dashboards_custom_metrics_updateNa superfície completa; na compacta, mb_execute_operation com id: "dashboards.custom_metrics.update".
Custo declarado: até 52 leituras e 1 escritas por chamada (contam na cota diária).
Parâmetros
metric_idstringrotaobrigatório
The custom metric id (dashboards.custom_metrics.list; without the custom: prefix).
namestringcorpoopcional
A unique name in the workspace (up to 60 characters).
descriptionstringcorpoopcional
A new description (empty clears it).
formulaanycorpoopcional
The new formula, as a tree of nodes (see the operation's description).
Deletes a workspace custom metric. It goes to the 30-day trash; widgets and report blocks that use it show an error until it is restored. Outside the screen it requires a dry run and a confirm_token, except a plain REST DELETE with a key allowed to delete. Requires edit access to Dashboards in the workspace.
Instruções para agentes
Warn the person that every widget using this metric breaks until it is restored.
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
dashboards:writee «Permitir exclusões» (dashboards:delete no OAuth)
Permissão
Editar no módulo
Tool do MCP
dashboards_custom_metrics_deleteNa superfície completa; na compacta, mb_execute_operation com id: "dashboards.custom_metrics.delete".
Custo declarado: até 1 leituras e 2 escritas por chamada (contam na cota diária).
Parâmetros
metric_idstringrotaobrigatório
The custom metric id (dashboards.custom_metrics.list; without the custom: prefix).
Resposta
oktrue
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.