Skip to main content
Glama

Datasource Calculated Fields Create

datasource_calculated_fields_create
Destructive

Validate and create calculated fields in an attached Data Studio datasource using fingerprint checks and dry-run previews, then apply and read back the draft.

Instructions

Validate and create calculated fields in an attached datasource.

Requires matching draft/published and datasource_get fingerprint. Expressions reference existing internal fields (t0.revenue); no within-batch references. Explicit aggregation is required; aggregate expressions require AUTO (7). Preview IDs are provisional. Publishes the full source draft once and reads both states back. operation_restore restores its recorded before-state. Does not create a datasource asset. Row/aggregate creation and undo were verified live; numeric results and all formula types remain unverified.

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_create"
  }
}

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

A4.1/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, it discloses that the whole source draft is published once, that both states are read back, that operation_restore can revert to a recorded before-state, and that preview IDs are provisional. It also flags verification status (row/aggregate creation and undo verified live; numeric results and formula types unverified), which is unusually candid risk context for a destructive mutation.

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

Conciseness4/5

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

Front-loaded with purpose, then constraints, then side effects, then verification caveats — every sentence carries information. The telegraphic phrasing ('matching draft/published') is occasionally too compressed, costing a little readability.

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?

An output schema exists so return values needn't be described, and the description covers preconditions, mutation scope, reversibility, and reliability caveats for a complex destructive tool. Gaps remain around permissions/authorization requirements and the meaning of allow_shared_source.

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 0%, so the description carries the burden: it explains expression referencing rules, the mandatory aggregation flag, and the fingerprint requirement. However, allow_shared_source, report_id, and dry_run are never explained, leaving three of six parameters undocumented anywhere.

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 opens with a specific verb and resource ('Validate and create calculated fields in an attached datasource'), which clearly separates it from the edit/delete siblings. It also explicitly scopes itself with 'Does not create a datasource asset.' It stops short of naming the sibling alternative (e.g. calculated_fields_edit) for updating existing fields.

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 concrete preconditions: matching draft/published state, a fingerprint from datasource_get, no within-batch references, and AUTO (7) for aggregate expressions. These effectively tell the agent when the call will succeed or fail. Missing is explicit routing guidance versus calculated_fields_edit for modifying existing fields.

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