Edit a feature's success metric

featuremetric.updateChanges dataCreates, updates or deletes something in your workspace.

What it does

Changes a feature metric of the connected workspace: name, description, unit, direction, baseline, target, measurement method and settings, the product KPI it rolls up to, or its status (planned, instrumented, measuring, hit, missed, abandoned). Send only the fields to change; null clears an optional one. Typical use: set status measuring once the app sends the data, then hit or missed when the result is in. Recorded values are not changed (record new ones with metric.observe). Get the id from featuremetric.list. Returns {success, data: the updated metric, uri}. Allowed only from the workspace's default branch when one is set (Settings → Workspace → Product): the wrapper reports the branch you are on, and a call from any other branch is refused.

Ask your agent

You don’t call featuremetric.update yourself. Say something like this to Claude Code, Cursor or another MCP-connected agent:

  • “We are now collecting checkout conversion, mark that metric as measuring”
  • “Raise the onboarding completion target to 70%”
  • “Link the search-time metric to the engagement KPI”

Inputs

NameTypeDescription
metricId
required
stringId of the feature metric (the id from featuremetric.list).
name
optional
stringNew name, up to 128 characters.
description
optional
string | nullHow it is calculated; null clears it.
unit
optional
stringWhat the numbers measure, free text up to 32 characters. Examples: "users", "percent", "usd", "seconds", "count".
direction
optional
enumWhich way is good. higher-better = bigger numbers are good (active users, conversion rate); lower-better = smaller numbers are good (page load seconds, churn rate, error count).
Allowed: higher-betterlower-better
baseline
optional
string | nullValue before the feature shipped. A plain number in a string: digits and an optional decimal point, no commas, symbols or units. It is stored as a number, so "5,000" or "5%" is rejected. null clears it.
target
optional
string | nullValue that counts as success. A plain number in a string: digits and an optional decimal point, no commas, symbols or units. It is stored as a number, so "5,000" or "5%" is rejected. null clears it.
measurementMethod
optional
stringHow the number is collected, free text up to 32 characters. Default "manual" (someone records values with metric.observe). Other examples: "integration:posthog", "integration:amplitude", "sql". A label only; nothing is collected automatically.
measurementConfig
optional
any | object | nullOptional free-form JSON object describing where the data comes from; stored as-is, not acted on. Example: {"tool": "posthog", "event": "checkout_completed", "window": "7d"}.
productKpiId
optional
string | nullThe product KPI (from productkpi.list) it moves; null unlinks it.
status
optional
enumplanned, instrumented, measuring, hit, missed or abandoned.
Allowed: plannedinstrumentedmeasuringhitmissedabandoned

The MCP call

What the agent’s MCP client sends (placeholders in angle brackets):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "featuremetric.update",
    "arguments": {
      "metricId": "<metricId>"
    }
  }
}

Connect your agent

npx -y @testmaze/mcp init tmt_xxx
claude mcp add tm --scope project -- npx -y @testmaze/mcp

Create the token in your Test Maze workspace under Settings → MCP. Setup for Cursor, Cline, Gemini CLI and Codex CLI is shown there too.