Skip to main content
Glama

Update calculated metric

update_calculated_metric

Update a calculated metric. Full replacement — you must send name, formula AND symbol.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCalculated metric ID (from list_calculated_metrics)
nameYesMetric name
symbolYesDisplay format: numbers, decimal, % or currency
formulaYesFormula as an ARRAY of tokens in evaluation order. CTR = clicks ÷ impressions × 100 is: [{id:"t1",type:"METRIC",query:{datasource_id:"gadw",data_view:"ACCOUNT",metrics:[{value:"clicks"}]}}, {id:"t2",type:"OPERATOR",operator:"÷"}, {id:"t3",type:"METRIC",query:{datasource_id:"gadw",data_view:"ACCOUNT",metrics:[{value:"impressions"}]}}, {id:"t4",type:"OPERATOR",operator:"×"}, {id:"t5",type:"NUMBER",number:100}]

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoThe calculated metric as saved — id, name, formula and symbol.
successYesTrue when the call succeeded. A failure comes back as an error result instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": {},
      +      "description": "The calculated metric as saved — id, name, formula and symbol.",
      +      "type": "object"
      +    },
      +    "success": {
      +      "description": "True when the call succeeded. A failure comes back as an error result instead.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.3/5.0
Behavior3/5

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

The annotation readOnlyHint=false already signals this is a write operation, and destructiveHint=false indicates it is not destructive. The description adds one useful behavioral detail: 'full replacement' meaning all fields are overwritten. This goes beyond the annotations by clarifying the semantics of the update, but it does not disclose other potential behaviors such as whether the operation is atomic, reversible, or has side effects on dependent widgets.

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?

The description is a single, front-loaded sentence that conveys the purpose and the most important operational requirement (full replacement) without any filler. It is extremely concise and efficient, earning every word. The key information is placed at the start, making it easy for an agent to scan.

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

Completeness3/5

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

The schema is extensive, especially for the formula parameter, and includes detailed descriptions and an example. Since an output schema exists (per context signals), the description does not need to explain return values. However, for a tool with such a complex input structure, the description offers minimal high-level guidance. It communicates the update and replacement requirement but does not, for instance, mention that the formula is a token array or provide an overview of the nested structure, relying entirely on the schema. This is adequate given the schema's thoroughness, but it leaves the agent to infer the operational context from the schema alone.

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 100%, so every parameter is already documented in the schema. The description's note 'you must send name, formula AND symbol' reinforces the required fields but adds no new meaning beyond what the schema's 'required' array already states. It does not elaborate on the formula structure or the meaning of the symbol enum, which the schema already covers in detail. Given the high coverage, a baseline of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the verb 'Update' and the resource 'calculated metric', and it adds the critical constraint of full replacement. It does not explicitly distinguish itself from create_calculated_metric, but the verb 'update' makes the intent unambiguous. The resource is specific enough to separate it from update_calculated_metric_widget, which targets a widget rather than the metric itself.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It does not mention that this is for modifying existing metrics as opposed to creating new ones, nor does it mention any prerequisites such as obtaining the ID from list_calculated_metrics. The only operational note is the full-replacement requirement, which is more of a parameter requirement than a usage condition.

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