Skip to main content
Glama

Set defined name

set_defined_name
Destructive

Create a defined name for a range or constant in Excel, making it usable in formulas like =SUM(Sales). Replaces any existing name with the same scope.

Instructions

Create a defined name for a range or constant (usable in formulas, '=SUM(Sales)'), replacing one of the same scope. The reference follows the formula safety rules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesLetters, digits, underscores and periods, e.g. 'TaxRate'.
pathYes
sheetNoScope sheet. Default: the workbook.
refers_toYesRange with sheet, 'Data!$B$2:$B$100', or a constant, '0.075'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructive=true/non-idempotent, but the description adds the key behavioral fact beyond them: an existing name of the same scope is replaced (i.e. what gets destroyed) and that refers_to is validated against formula safety rules. The 'formula safety rules' phrase is left undefined, which keeps it short of a 5.

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?

Two compact sentences: the primary action and example first, then the replacement/validation caveat. No filler, no repetition of schema details.

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?

For a 4-parameter mutation tool with no output schema, the description covers action, scoping, and overwrite semantics, which is enough to invoke it correctly. It omits return/confirmation behavior and error cases for invalid references, but those are minor given the simple contract.

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 coverage is 75% and already documents the name-format, sheet-scope default, and refers_to examples, so the schema carries most of the burden. The description adds only the implicit scoping notion ('one of the same scope'), which maps to 'sheet' but without new syntax or constraints.

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?

States a specific verb+resource ('Create a defined name for a range or constant'), with a concrete use example ('=SUM(Sales)'). The scope/replacement clause ties it directly to the delete_defined_name sibling by implying the same object class without ambiguity.

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?

Usage is implied: it explains the feature (usable in formulas) and that it overwrites a same-scope name, which tells the agent this is the upsert-style entry point. However it never states when to prefer this over delete_defined_name or how to recover a prior definition.

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