Skip to main content
Glama
OpenPyXL MCP Server

OpenPyXL MCP Server

by jonemo

get_values_of_cell_range

Retrieve values from a continuous Excel cell range by specifying the workbook, sheet, top-left cell, and bottom-right cell for targeted data extraction.

Instructions

Get the value of a continuous range of cells in an Excel workbook.

Args: filepath: The path to the Excel workbook. For example, "~/Downloads/test.xlsx" or "C:\myfolder\myfile.xlsx". If only a filename is provided, the file will be searched for in the Desktop and Downloads folders. sheet_name: The name of the sheet to get the value from. top_left_cell: The top left cell of the range. For example, "A1". bottom_right_cell: The bottom right cell of the range. For example, "RC976".

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": {
      "filepath": "<filepath>",
      "sheet_name": "<sheet_name>",
      "top_left_cell": "<top_left_cell>",
      "bottom_right_cell": "<bottom_right_cell>"
    },
    "name": "get_values_of_cell_range"
  }
}

Input Schema

NameRequiredDescriptionDefault
filepathYes
sheet_nameYes
top_left_cellYes
bottom_right_cellYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the safety profile itself; it never states this is a read-only operation or what happens on a missing file, bad sheet name, or invalid range. It does add one genuinely useful behavioral detail absent from any structured field — that a bare filename triggers a search of the Desktop and Downloads folders.

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?

The one-line purpose is front-loaded and the args block is scannable, with no filler or repetition. The trailing newline and boilerplate "Args:" block are conventional rather than wasteful, though the filepath entry is noticeably longer than the others.

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?

An output schema exists, so return structure needn't be explained, and the parameters are fully documented. The remaining gap is semantic: for a values-reading tool it never says whether formulas yield cached results or formula text, nor how empty or merged cells appear in the returned range.

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 description coverage is 0%, so the description has to compensate, and it does: all four parameters are explained with concrete format examples (Windows and Unix paths, A1 notation, RC976) and an explicit fallback rule for bare filenames. What it does not clarify is how cell references are interpreted when the sheet's used range is smaller than the requested range.

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

Purpose4/5

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

The first sentence names a specific verb and resource ("Get the value of a continuous range of cells in an Excel workbook"), and the word "continuous" plus the top-left/bottom-right parameter names make the rectangular-range scope unambiguous. It does not name sibling tools like get_cell_value or search_in_cell_range, so the distinction is inferable rather than stated.

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?

The range framing implies when to use this over a single-cell read, but the description never says so explicitly and names no alternatives. There is no guidance on prerequisites (file must be closed, sheet must exist) or on when a different sibling would be the better pick.

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