Skip to main content
Glama

polish_format_file

Formats a safely detected source file using an installed deterministic formatter, with atomic writes and a dry-run preview option.

Instructions

Format one safely detected source file with an installed deterministic formatter. Writes atomically; dryRun returns a preview.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "polish_format_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
backupNo
dryRunNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden; it does disclose atomic writes, that dryRun yields a preview, and that a formatter must already be installed. It omits what happens when no formatter is installed, whether the file is rewritten in place, and whether changes are reversible.

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 short sentences, no filler, with the write/preview behavior front-loaded ahead of the parameter detail. Every clause carries information.

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?

For a no-annotation, no-output-schema, 0%-coverage mutation tool, the definition covers the core action and the preview mode but leaves the backup parameter and error/fallback behavior undocumented. Adequate to attempt a call, not enough to predict side effects.

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 coverage is 0% for all three parameters, yet only dryRun receives meaning ('returns a preview'). The 'backup' boolean is never explained (what gets backed up, where, retention) and 'path' has no stated constraints or expected form.

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 and resource ('Format one ... source file') plus the mechanism ('installed deterministic formatter'), which implicitly separates it from the plural/project/text format siblings. It does not name any sibling explicitly, so an agent must infer the boundary from the word 'one'.

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

Usage Guidelines2/5

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

No explicit when-to-use, when-not-to-use, or alternative routing. The phrase 'safely detected source file' hints that detection must succeed first, but nothing tells the agent whether to choose polish_format_files, polish_format_changed, or polish_format_text instead.

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