Skip to main content
Glama
xlsx-mcp-server
by knorq-ai

add_named_range

Adds a named range to an .xlsx workbook using a file path, range name, cell range, and optional sheet for scoped names.

Instructions

Add a named range to the workbook.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_path": "<file_path>",
      "name": "<name>",
      "range": "<range>"
    },
    "name": "add_named_range"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesName for the range
rangeYesCell range (e.g. 'A1:C10')
sheetNoSheet the range belongs to (for scoped names)
file_pathYesAbsolute path to the .xlsx file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.3/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, yet it only implies mutation through the verb 'add'. It does not disclose whether the operation writes to disk, whether an existing name is overwritten or an error is raised, whether the file must be closed in Excel, or what the response contains.

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?

It is a single short sentence with no wasted words and is front-loaded with the verb. However, the brevity comes at the cost of under-specification rather than efficiency, leaving no structure to guide the caller.

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?

For a mutation tool with no annotations, no output schema, and a non-trivial optional 'sheet' parameter controlling name scoping, the description should explain the write semantics and scoping rule. None of that is covered, so an agent cannot tell how the call behaves on conflicts or whether the change is persisted.

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 description coverage is 100%, with every one of the four parameters documented inline (including the scoped-name hint for 'sheet'), so the baseline of 3 applies. The description adds no meaning beyond the schema, but the schema already does the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The sentence 'Add a named range to the workbook' is essentially a restatement of the tool name add_named_range, adding only the trivial detail that the target is a workbook. It does not distinguish the tool from siblings such as list_named_ranges or delete_named_range beyond the obvious verb, and gives no scope information about what a 'named range' is in this API.

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 when-to-use guidance is present: nothing says whether the named range must be created before it can be referenced elsewhere, whether the sheet parameter is needed for workbook-level vs sheet-scoped names, or what to do if the name already exists. There is no pointer to sibling tools such as list_named_ranges for checking existing names.

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