Skip to main content
Glama
Knight60
by Knight60

calculate_field

Compute field values using arithmetic or logical expressions in Python, Arcade, or SQL. Update or populate a field with results from calculations.

Instructions

Calculate field values, e.g. expression "!AREA! / 10000". expression_type: PYTHON3, ARCADE, SQL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
map_nameNo
expressionYes
field_nameYes
layer_nameYes
expression_typeNoPYTHON3

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are present, so the description carries the full burden. It discloses the expression types and gives an example, but does not mention that the operation modifies data (likely destructive), overwrites existing values, or any error conditions. Important behavioral traits like irreversibility are omitted.

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 description is very short (one sentence plus an example), which is concise, but it could be better structured. It includes the example and expression types, but does not front-load the main action. The lack of structure reduces clarity.

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?

Given the tool has 5 parameters (3 required), no annotations, and the description is minimal, it is incomplete. The output schema exists but the description does not leverage it. Behavioral context (e.g., destructive nature) is missing. The tool modifies data, requiring more explanation than provided.

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

Parameters1/5

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

Schema description coverage is 0%, meaning the description adds no explanation for parameters. It only mentions 'expression' and 'expression_type' implicitly, but does not explain 'map_name', 'field_name', or 'layer_name'. The schema provides the names, but the description fails to add meaning or context for these parameters.

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 tool calculates field values using expressions, provides an example of the expression syntax, and lists the supported expression types (PYTHON3, ARCADE, SQL). This effectively communicates the core purpose and distinguishes it from sibling tools like execute_arcpy_code that run arbitrary code.

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 vs alternatives. It does not mention prerequisites, limitations, or when not to use it (e.g., for non-numeric fields or feature classes without a schema). The description lacks context for selecting the appropriate expression type.

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/Knight60/ArcGIS-MCP'

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