Change a product KPI's definition

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

What it does

Edits a product KPI: name, description, unit, direction, targetValue, measurementMethod, measurementConfig, ownerId, rationale, or status "archived". Pass only the fields to change. Every change that alters the definition is stored as a new version with your note, so the goal's history stays readable. Agents cannot set status "active": a person activates a proposed KPI on the Dashboard → Goals card. Returns {success, data: the KPI after the change, uri}.

Ask your agent

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

  • “Raise the weekly-active-users target to 8,000 and note why”
  • “Archive the NPS KPI, we stopped measuring it”
  • “Point the churn KPI at the kpi-definitions doc as its rationale”

Inputs

NameTypeDescription
kpiId
required
stringThe KPI id from productkpi.list.
name
optional
stringNew KPI name, up to 128 characters.
description
optional
stringNew definition in plain words.
unit
optional
stringNew unit: count, percent, usd, seconds, … (free string).
direction
optional
enumhigher-better or lower-better.
Allowed: higher-betterlower-better
targetValue
optional
stringNew goal. 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.
measurementMethod
optional
stringmanual, integration:<provider> or sql.
measurementConfig
optional
objectSettings for the measurement method (JSON object).
ownerId
optional
stringUser id of the person accountable for the KPI.
rationale
optional
object | nullThe document that justifies the target ({path, md5} from docs manifest); null clears it.
status
optional
enum"archived" = no longer tracked. Activation is for people, on the Dashboard.
Allowed: proposedarchived
note
optional
stringWhy the change. Stored on the version.

The MCP call

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

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

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.