Skip to main content
Glama

ZeroWidth Ledger

Edit a metric's definition

ledger_metrics_update
Destructive

Corrects a metric's name, unit, description, kind (measure / event), direction (which way is good), target, cadence, icon, level, or the metrics it drives (its place in the metric tree). Readings are untouched. Only what you pass changes. The slug is not editable here — external writers address metrics by slug. Fails with conflict when a rename collides with a live metric. metricId is the id from ledger_metrics_list. May return needs_confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iconNoThe mark the metric wears in every tool: the thing it counts (phone for calls, landmark for profit). "" goes back to the catalog's icon.
kindNomeasure = a value each reading; event = a count of occurrences.
nameNo
unitNo"min", "%", "$", "tickets/day".
levelNooutcome = what the business is judged on; driver = a number that moves an outcome; activity = daily work. "" unplaces it.
drivesNoIds of the metrics this one moves. Replaces the current set; pass the full list. Loops are refused.
targetNoGoal value in the metric's unit; null clears.
cadenceNoHow often a reading is expected.
metricIdYesMetric id (from ledger_metrics_list).
directionNoup = higher is better, down = lower is better, none.
workspaceNoWorkspace slug. Personal tokens with no default workspace MUST pass this; tokens with a default can override per call. Ignored for workspace API keys.
approvalIdNoApproval id from a prior needs_confirmation envelope.
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the destructiveHint=true annotation: it discloses partial-update behavior, that readings are unaffected, that the slug is immutable, the conflict-on-rename failure mode, and that a needs_confirmation envelope may be returned. These are exactly the behavioral traits an agent needs before invoking a mutating tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the verb and editable fields, then layers constraints (immutability, conflict, confirmation) in tight declarative sentences. Every clause carries information; nothing is padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter mutation tool with no output schema, it covers the essentials: scope of change, immutable fields, failure mode, and the confirmation flow. It could tie approvalId more explicitly to the needs_confirmation envelope, but the schema covers that parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 85%, so the schema already documents most parameters (including kind, direction, drives, cadence). The description restates the field list and adds only the 'metric tree' framing for drives, so it adds marginal value beyond structured fields, which is the baseline-3 case.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (corrects/edits) and resource (a metric's definition) and enumerates the editable fields. It explicitly distinguishes itself from reading tools with 'Readings are untouched,' so an agent can separate it from ledger_metrics_record_reading without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context: partial-update semantics ('Only what you pass changes'), the source for metricId ('from ledger_metrics_list'), and a hard exclusion (slug not editable). It does not explicitly say when to prefer this over ledger_metrics_create or ledger_metrics_archive, so it stops short of full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources