Skip to main content
Glama

beautify_js

Takes minified or hard-to-read JavaScript and reformats it with configurable indentation to produce clear, readable code.

Instructions

Beautify JavaScript code to make it readable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript code to beautify
indent_sizeNoNumber of spaces for indentation

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, and it adds almost nothing beyond the tool's name. It doesn't state that this is a pure string transformation with no side effects, what the output shape is, or how invalid/malformed JavaScript input is handled. 'Make it readable' is a near-restatement of 'beautify' rather than behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with no filler; the action verb is front-loaded and the sentence is properly sized for a simple transformation tool. Minor deduction because 'to make it readable' is slightly redundant with the verb 'beautify,' but the overall economy is good.

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 simple two-parameter tool with fully documented schema properties, the description states the core function adequately. However, with no annotations and no output schema, an agent is left guessing about the return format, whether the operation mutates anything or is a pure function, and what happens on invalid JavaScript input.

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?

Schema description coverage is 100%, so the baseline of 3 applies: both 'code' and 'indent_size' are already documented in the schema. The tool description echoes 'JavaScript code' but adds no parameter-level meaning beyond what the schema provides, so it neither helps nor hurts.

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 names a specific verb ('Beautify') and a specific resource ('JavaScript code'), and its JavaScript scoping structurally distinguishes it from beautify_css while the beautify action contrasts with minify_js. The purpose clause 'to make it readable' adds a bit of intent. It doesn't explicitly name siblings, so it stops short of a 5.

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?

Usage context is implied: use this when you want readable JavaScript output. However, there is no explicit when-to-use/when-not-to-use guidance, and none of the four siblings (minify_js, beautify_css, minify_css, is_minified) are referenced as alternatives, which would meaningfully help routing for a tool that lives in a family of similar formatting utilities.

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