Skip to main content
Glama

fmt

Read-only

Reflow paragraphs to a target character width while preserving blank-line separated paragraph boundaries. Read-only, returns JSON or plain text.

Instructions

Reflow paragraphs to a target character width, preserving paragraph boundaries (blank-line separated). Read-only, no side effects. Returns JSON with reflowed text by default; use --raw for plain output. Use to reformat prose without breaking paragraph structure. Not for hard line wrapping — use 'fold' to break at exact character positions without paragraph awareness. See also 'fold'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
encodingNoText encoding.utf-8
max_linesNoMaximum JSON lines to emit.
pathsNoFiles to format, or '-' for stdin. Defaults to stdin.
rawNoWrite formatted text without a JSON envelope.
widthNoMaximum output line width.
Behavior5/5

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

Declares read-only and no side effects, consistent with annotations. Adds behavioral details about default JSON output and --raw flag for plain output. No contradiction.

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?

Front-loads core function, then adds read-only and return format, then usage guidance. Every sentence serves a purpose, no waste. Concise yet comprehensive.

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?

Covers return format (JSON vs raw), parameter defaults mentioned, and usage context. Lacks mention of max_lines or encoding parameters explicitly, but schema covers them. Sufficient for agent decision.

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

Parameters3/5

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

Input schema has 100% coverage with descriptions for all 5 parameters. The description mentions '--raw' and 'width' but does not add significant new semantics beyond schema. Baseline 3 is appropriate.

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 clearly states the tool reflows paragraphs to a target character width while preserving paragraph boundaries, distinguishing it from related tools like 'fold'. The verb 'Reflow' and specific resource 'paragraphs' provide a clear purpose.

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

Usage Guidelines5/5

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

Explicitly states when to use (reformatting prose without breaking paragraph structure) and when not to use (hard line wrapping), and directs to alternative tool 'fold'. This provides strong guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/caseSHY/AI-CLI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server