Skip to main content
Glama

get_formula

Retrieve the formula string from a specified Excel cell without calculating its result. Use workbook ID, sheet, and cell address to inspect formulas directly.

Instructions

Get the formula string from a cell (returns the formula itself, not the calculated result)

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": {
      "workbookId": "<workbookId>",
      "sheet": "<sheet>",
      "cell": "<cell>"
    },
    "name": "get_formula"
  }
}

Input Schema

NameRequiredDescriptionDefault
cellYesCell address (e.g., 'A1')
sheetYesSheet name or index (1-based)
workbookIdYesThe workbook ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden; it usefully discloses the return semantics (formula text, not evaluated value), which is the key behavioral distinction. It omits what happens for cells with no formula (empty string vs error) and whether the leading '=' is included, both of which matter for a read tool.

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?

A single front-loaded sentence with a parenthetical that earns its place by preventing the most likely misuse. No redundant restatement of the name or schema.

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?

This is a simple three-parameter read tool with a fully documented schema, so most of the definition's burden is already met, and the return-value clarification is valuable. Still missing are the edge-case behaviors (non-formula cells, formula string format) that would let an agent handle results correctly without trial and error.

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 all three required parameters documented (workbookId, sheet, cell with an A1 example), so the schema already carries parameter meaning. The description adds nothing about parameter behavior, so the baseline 3 applies.

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 description gives a specific verb and resource ('Get the formula string from a cell') and the parenthetical distinguishes it from value reads, so an agent can tell it apart from read_cell without opening the schema. It does not name the sibling explicitly, which keeps it just short of a 5.

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 only implied: the phrase 'not the calculated result' signals this is the tool for formula inspection rather than value retrieval, but no alternative tool is named and no condition or exclusion is stated. An agent must infer that read_cell is the counterpart.

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