Skip to main content
Glama
S-CurveLabs

letin

Official
by S-CurveLabs

evaluate_m

Read-only

Execute any M expression and retrieve structured results: tables include column names/types, errors return reason and message. Optionally profile columns, count rows, or reference workbook queries by source.

Instructions

Run any M expression and get the result as data. Tables come back with column names, types and the first rows rows (cell errors shown as #ERROR); lists, records, scalars and functions (with signature) are described too; an M error comes back as reason + message. With source, the expression can reference that source's queries by name (e.g. Table.RowCount(Sales)), including unsaved edits of an open workbook. count_rows and profile (Table.Profile: min/max/nulls/distinct per column) scan the whole result, so they can be slow. ignore_privacy_levels=true disables the privacy firewall for this throwaway evaluation only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNo
sourceNo
profileNo
count_rowsNo
expressionYes
timeout_secondsNo
ignore_privacy_levelsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses concrete behaviors: the exact return format for tables, lists, records, scalars and functions; how M errors are surfaced; that count_rows/profile scan the entire result; that ignore_privacy_levels disables the privacy firewall; and that source includes unsaved edits. This is rich, useful behavioral context.

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?

The description is dense but organized: it opens with the core purpose and return behavior, then adds source capabilities, performance caveats, and privacy handling. Every sentence adds distinct value, and there is no filler or repetition of schema fields.

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 tool with no output schema, the description thoroughly explains what the agent can expect in return, including error behavior and function signatures. The only notable gap is the lack of explicit timeout_seconds semantics, and it could more explicitly position this tool against evaluate_query/evaluate_steps, but overall an agent has enough to call it correctly.

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?

With 0% schema description coverage, the description carries most of the burden locked. It explains the semantics of rows, source, count_rows, profile, and ignore_privacy_levels, and even gives an expression example. It does not explain timeout_seconds or the full syntax of expression, but it compensates well for most parameters given the schema's bare names and defaults.

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 states a specific verb and resource: 'Run any M expression and get the result as data.' It also clarifies the breadth of accepted inputs (tables, lists, records, scalars, functions) and the output shape, which makes the tool's purpose unmistakable and distinct from sibling tools that operate on queries or steps.

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

Usage Guidelines4/5

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

The description gives practical guidance on when to use the tool: for ad hoc M expressions, optionally with a source to reference existing queries, and warns that count_rows and profile can be slow. It does not explicitly contrast with siblings like evaluate_query or evaluate_steps, but the 'any M expression' framing implies the general-purpose evaluation niche.

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