Skip to main content
Glama

lsp_format_preview

Read-onlyIdempotent

Preview language-server formatting edits for a file before applying changes, so you can review whitespace and indentation adjustments safely.

Instructions

Preview language-server formatting edits for a file without applying them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
limitNo
tabSizeNo
insertSpacesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description's only added behavior is that edits are shown and not applied, which reinforces but does not go beyond the read-only annotation; it says nothing about output shape or size limits on the preview.

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 tight sentence, front-loaded with the verb and the non-applying constraint. Nothing is padded.

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?

There is no output schema, so the description should convey the shape of the preview, and it only hints at 'formatting edits'. Combined with four undocumented parameters and no clarity on where the preview result goes, the definition leaves real gaps for a formatting tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across four parameters, and the description only implicitly addresses 'file'. The format-controlling parameters (limit, tabSize, insertSpaces) are never mentioned, so an agent gets no guidance on what they mean or which to set, and with low coverage the description is expected to compensate but does not.

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?

States a specific verb (preview) and resource (language-server formatting edits) and bounds it with 'for a file without applying them', which cleanly distinguishes it from write_file/edit_file/apply_patch. It stops short of naming the sibling that actually applies the edits, so it is clear but not sibling-complete.

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?

The phrase 'without applying them' implies the intended workflow (preview before committing a format), but there is no explicit when-to-use/when-not guidance nor any pointer to the apply step. Usage is inferable rather than stated.

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

Deploy Server

Other Tools