Skip to main content
Glama
logisky

logisheets-mcp

eval_formula

Read-only

Evaluate an Excel formula in a private scratch cell and get the computed result without altering your spreadsheet. Use it to test formulas or look up block references before applying rules.

Instructions

Evaluate an Excel-style formula in a private scratch cell and return the computed value. Nothing is written to user-visible cells. Returns {type, value} where type is one of:

  • "number" — value is a JS number

  • "str" — value is a string

  • "bool" — value is a JS boolean

  • "error" — value is the Excel error code (e.g. "#REF!", "#NAME?")

  • "empty" — value is null (formula returned an empty cell)

Use for:

  • Quick checks: "=SUMIFS(OrderStatus, "amount", "*")" → total

  • Sanity-test a candidate template before set_field_rule

  • BLOCKREF / BLOCKREFS lookups against any block in the workbook

Leading "=" is optional — it is added automatically if missing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exprYesFormula, with or without leading "=". E.g. "SUM(A1:A10)" or "=BLOCKREF(\"orders\", \"O001\", \"amount\")".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0
    • changedInput schema / properties / expr / description
      Previous value: -"Formula, with or without leading \"=\". E.g. \"SUM(A1:A10)\" or \"=BLOCKREF(\\\"orders\\\", \\\"O001\\\", \\\"金额\\\")\"."New value: +"Formula, with or without leading \"=\". E.g. \"SUM(A1:A10)\" or \"=BLOCKREF(\\\"orders\\\", \\\"O001\\\", \\\"amount\\\")\"."
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, which is reinforced by the description's statement that 'Nothing is written to user-visible cells' and 'private scratch cell'. The description adds detail on the return format (type and value) and enumerates possible types, which goes beyond annotations. No contradictions exist.

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 description is well-structured and front-loaded: the first sentence states the core action and result, followed by a list of return types, then use cases, and a final note on the '='. It is relatively concise for the information conveyed, with no redundant sentences. Each part adds value.

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?

Given a single parameter, no output schema, and existing annotations for read-only, the description covers the essential context: purpose, return format, use cases, and syntax details. It is complete enough for an agent to call the tool correctly without additional information. Minor gaps like error handling details are covered by the return type list.

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?

The input schema covers the sole parameter 'expr' at 100% with a description that already mentions 'with or without leading =' and provides an example. The description repeats the '=' note and gives additional examples but does not add substantial new semantics beyond the schema. Since schema coverage is complete, the baseline of 3 is appropriate.

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 clearly states the tool evaluates Excel-style formulas in a private scratch cell and returns a computed value. It distinguishes itself from siblings like get_cells (reads cells) and set_cells (writes cells) by specifying its unique function. The use of 'Evaluate' and 'return the computed value' makes the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit 'Use for' scenarios: quick checks, sanity-testing templates before set_field_rule, and BLOCKREF/BLOCKREFS lookups. This gives clear guidance on when to use the tool, and it implicitly differentiates from set_field_rule by mentioning 'before' it. It also notes the optional leading '=' handling, which is a usage detail.

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