Skip to main content
Glama

Add a column

sheet_add_column

Add a computed column to a spreadsheet and save the result to a new file. Returns the new file path, row count, and preview of the first rows.

Instructions

Call this tool to add a computed column and save the result to a NEW file; the source is never modified unless out_path points at it. Returns the new file path, the row count and a preview of the first rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the new column. It must not already exist on the sheet
pathYesPath to the source .xlsx/.xlsm/.xlsb/.ods/.csv/.tsv file (~ is expanded); it is never modified
sheetNoSheet name; default is the first sheet
valuesNoExplicit values, one per data row, instead of a formula. Missing entries are left blank
formulaNoExpression over the columns of each row, in the same expression language as sheet_query, e.g. "[Qty] * [Unit Price]" or '[Country] = "PL"'. Give either formula or values
decimalsNoRound numeric formula results to this many decimals. Default: the widest decimal count of the columns the formula reads, capped at 2 when they all hold 2 or fewer (money in, money out); otherwise no rounding beyond float cleanup
out_pathNoOutput file; default <source>-plus-<column>.<same ext>. The source file is left untouched unless this points at it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of disclosing side effects, and it does so well. It explicitly states the source is never modified unless out_path points at it, and it describes the return value: new file path, row count, and a preview of the first rows. This gives an agent a clear mental model of the operation's effects.

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

Conciseness5/5

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

The description is two sentences and every sentence earns its place. The core purpose and the critical safety behavior are front-loaded, and the return-value information is compactly included. There is no redundant repetition of schema details.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is complete for correct invocation: it covers the operation, the crucial file-safety behavior, and the return values. With 7 parameters fully documented in the schema and no output schema, the description fills the remaining gaps without omitting anything an agent needs to know to call the tool correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds real value beyond the schema by explaining the key safety semantic: the source is never modified unless out_path points at it. It also frames the operation as producing a new file, which helps disambiguate the role of out_path.

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 uses a specific verb and resource: 'add a computed column' and 'save the result to a NEW file.' This clearly distinguishes the tool from sibling sheet tools, especially ones that may modify the source file, and leaves no ambiguity about the core 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?

The description states when to call the tool: to add a computed column and produce a new file. It also clarifies the source file is never modified unless out_path points at it, giving clear context. It does not explicitly name an alternative tool or a when-not-to-use condition, so it stops short of a full 5.

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