Skip to main content
Glama

add_calculated_field

Add a calculated field to the datasource.

Instructions

Add a calculated field to the datasource.

For formula syntax and best practices, read: read_resource('cwtwb://skills/calculation_builder')

Input Schema

NameRequiredDescriptionDefault
roleNo
formulaYes
datatypeNoreal
field_nameYes
field_typeNo
table_calcNo
internal_nameNo
default_formatNo
validate_formulaNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.28.0
    • addedInput schema / properties / internal_name
      Added value: +{
      +  "default": "",
      +  "title": "Internal Name",
      +  "type": "string"
      +}
    • addedInput schema / properties / table_calc
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Table Calc"
      +}
    • addedInput schema / properties / validate_formula
      Added value: +{
      +  "default": true,
      +  "title": "Validate Formula",
      +  "type": "boolean"
      +}
  2. First observedv0.18.1

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the mutation ('add ... to the datasource') and references a formula skill, but says nothing about validation behavior (validate_formula param), idempotency, required permissions, or duplicate handling. Significant gaps for a mutation tool with 9 parameters.

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?

Two sentences, front-loaded with the core action and followed by a reference pointer. No waste, though the pointer is arguably the only additional value and the description is quite thin overall.

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

Completeness2/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 explained. But for a 9-parameter mutation with zero schema coverage and no annotations, the description is far too thin — most parameter semantics and behavioral traits remain undisclosed.

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 9 parameters, so the description must compensate. Its only parameter-adjacent content is the formula resource pointer, leaving role, datatype, field_type, table_calc, default_format, internal_name, and validate_formula entirely undocumented. It does not add meaning beyond the bare schema.

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?

States a specific verb+resource: 'Add a calculated field to the datasource.' An agent can distinguish it from sibling mutators like remove_calculated_field and validate_formula. However, it does not explicitly differentiate from repair_calculated_field_issues or audit_calculated_fields, so it stops short of a 5.

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?

Points the agent to a skill resource for formula syntax, which is a useful usage cue, but gives no when-to-use/when-not guidance relative to siblings such as validate_formula or remove_calculated_field. Usage is implied rather than stated.

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