Skip to main content
Glama

add_calculated_field

Add a computed field to a dataset using an RDL expression for values not in the source query. Rejects if the field name already exists.

Instructions

Append a calculated to the named dataset. Calculated fields carry an expression () instead of a column reference (); use them for derived fields like Total = Amount * Quantity that aren't in the source query but should be available via Fields!Name.Value. Refuses if a field of the same name already exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
expressionYesRDL expression, e.g. '=Fields!Amount.Value * Fields!Quantity.Value'.
field_nameYes
dataset_nameYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses a key behavioral trait: refusal on duplicate field names. However, it does not mention whether an editing transaction is required (common among sibling tools), authentication needs, or error handling, leaving gaps in transparency.

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, no redundant information. The purpose is front-loaded in the first sentence, followed by usage context and a constraint. Efficient and to the point.

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?

Given no output schema and 4 required params, the description provides essential context (refusal on duplicates, expression usage) but omits prerequisites (e.g., editing transaction status), success/failure behavior, or return value. For a tool with this complexity, it is adequate but not fully comprehensive.

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 only 25% (only 'expression' has a description). The description adds context about expression semantics (using Fields!Name.Value) but does not explain 'path', 'field_name', or 'dataset_name' individually. For a tool with 4 params and low schema coverage, more parameter guidance is needed.

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?

The description clearly states the action ('Append a calculated <Field> to the named dataset') and identifies the specific resource type (calculated field). It distinguishes from sibling tools like add_dataset_field by explicitly contrasting calculated fields with column references, and from remove_calculated_field by its append action.

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 explicit guidance on when to use calculated fields (derived fields like Total = Amount * Quantity not in source query) and mentions a constraint (refuses if same name exists). Lacks explicit 'when not to use' or alternatives, but the context is clear enough for effective selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mafaq229/pbirb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server