Skip to main content
Glama

Datasource Calculated Fields Edit

datasource_calculated_fields_edit
Destructive

Edit datasource calculated field formulas, labels, and aggregation while retaining calc field IDs, with fingerprint conflict checks and formula-cycle rejection before publishing.

Instructions

Edit datasource formulas/labels/aggregation while retaining calc field IDs.

Shared sources require explicit opt-in; unrelated unpublished drafts are rejected. Publishes full draft with journal/read-back/operation_restore. A formula may reference other calculated fields (t0.calc_*); an edit that would close a reference loop is refused with FORMULA_CYCLE. Existing chart references keep their IDs, but new semantics may affect them. ABS/SUM edits with retained IDs, reload and undo verified live. Consumer effects, numeric results and dependency-aware formula edits remain pending.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "datasource_id": "<datasource_id>",
      "fields": "<fields>",
      "expected_fingerprint": "<expected_fingerprint>"
    },
    "name": "datasource_calculated_fields_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldsYes
dry_runNo
report_idNo
datasource_idYes
allow_shared_sourceNo
expected_fingerprintYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.5

TDQS

B3.3/5.0
Behavior4/5

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

Beyond the destructive=true annotation, the description discloses substantial behavior: the edit publishes the full draft, runs a journal with read-back and operation_restore, and refuses edits that close a reference loop with FORMULA_CYCLE. It also warns that retained chart IDs may still change semantics. The trailing note about what remains unverified is noisy but does add honest limitation context.

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

Conciseness3/5

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

The first two sentences front-load the core purpose and prerequisites well. However, the closing lines read like internal changelog fragments ("reload and undo verified live", "remain pending") rather than agent-facing guidance, and the sentence about publishing the draft is fragmented across lines.

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?

An output schema exists, so return values need not be described, and the cycle/ID-retention behavior is well covered. But for a destructive six-parameter tool with zero schema descriptions, omitting the semantics of expected_fingerprint and dry_run leaves a material gap an agent must fill by trial.

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

Parameters2/5

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

Schema description coverage is 0% across six parameters, so the description must carry the load, yet it only explains the fields payload shape and the allow_shared_source opt-in. The required expected_fingerprint (evidently a concurrency guard), the dry_run default of true, and report_id are never mentioned, leaving an agent to guess at the most consequential inputs.

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?

"Edit datasource formulas/labels/aggregation while retaining calc field IDs" names a specific verb and resource and states the distinguishing property (ID retention) that separates it from the create/delete siblings. It stops short of naming those siblings as alternatives, so an agent must infer the boundary from names alone.

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

Usage Guidelines3/5

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

The description gives one real prerequisite (shared sources need explicit allow opt-in, unrelated unpublished drafts rejected) and implies a preview-then-publish flow, but never states when to choose this over datasource_calculated_fields_create or datasource_fields_edit_metadata, nor when an edit should be avoided entirely.

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

Deploy Server

Other Tools