Skip to main content
Glama
S-CurveLabs

letin

Official
by S-CurveLabs

format_m

Read-only

Format Power Query M expressions or section documents into readable, one-step-per-line code while preserving comments and verifying token-for-token equivalence to prevent meaning changes.

Instructions

Pretty-print M (an expression or a section document): one step per line, long calls broken at their arguments, comments kept. The output is verified token-for-token against the input, so meaning can never change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formulaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description adds a strong safety guarantee: the output is verified token-for-token against the input, so meaning can never change. It also discloses formatting details and comment preservation, giving the agent confidence about side effects and output fidelity.

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 communicate purpose, scope, formatting behavior, and a correctness guarantee with no filler. The key capability is front-loaded and every clause adds information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity, single parameter, and read-only annotation, the description fully covers what the tool does, what input it expects, and what the output guarantees. No critical information needed for correct invocation appears to be missing.

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 compensates by indicating that the single 'formula' parameter accepts either an M expression or a section document. It does not specify parameter syntax or error cases, but for a single simple string parameter this is sufficient semantic guidance.

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 names a specific action, 'Pretty-print M', and precisely defines the input scope as 'an expression or a section document'. It also details observable formatting behaviors (one step per line, long calls broken at arguments, comments kept), which clearly distinguishes this tool from the query-level format_queries sibling.

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 makes the use case clear: call this tool when you need to pretty-print an M expression or section document. It does not explicitly name alternatives or exclusion criteria, but the scope is specific enough that an agent can infer when it applies without ambiguity.

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