Skip to main content
Glama
S-CurveLabs

letin

Official
by S-CurveLabs

validate_m

Read-only

Check Power Query M code for syntax errors, unknown references, and argument mismatches with line/column details and plain-English fixes. Pass a formula or source to validate.

Instructions

Check M before using it: syntax errors with line/column and a plain-English cause (missing comma between steps, unquoted step name, if without else ...), unknown steps/queries/functions with did-you-mean, and wrong argument counts for library functions. Pass formula (an expression or a whole section document); add source so its query names are known. Or pass source (+ optional query) alone to validate what is already there.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo
sourceNo
formulaNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only provide readOnlyHint:true. The description adds useful behavioral detail: it reports line/column syntax errors, plain-English causes, did-you-mean suggestions for unknown steps/queries/functions, and argument-count checks. No contradiction with annotations exists.

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?

Two sentences with no filler. The first sentence front-loads the purpose and key behaviors; the second sentence covers the valid invocation patterns. Every clause adds information useful for invoking the tool correctly.

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?

The description names the error classes and parameter modes, which is strong, but it does not state what happens on success or what a successful validation returns, and there is no output schema. It also leaves implicit whether at least one of formula/source is required, despite all parameters being optional in the schema.

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 the parameter burden. It explains formula as an expression or whole section document, source as providing known query names, and query as optional alongside source. The 'query' parameter remains thinner than the others, but the main parameters are meaningfully defined.

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 states a clear verb and resource: 'Check M before using it' and enumerates specific checks (syntax errors with line/column, unknown identifiers with did-you-mean, wrong argument counts). It is clearly distinct from evaluate_m, format_m, and m_function_help in behavior, though it never names a sibling explicitly.

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 concrete usage context: validate before using M, pass formula with optional source, or validate existing source with optional query. It does not explicitly say when not to use this tool or name alternatives, but the two invocation modes are clearly described.

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