Skip to main content
Glama

format_javascript

Format and beautify JavaScript or CSS code by adjusting indentation and structure for improved readability and consistency.

Instructions

Format and beautify JavaScript/CSS code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript or CSS code to prettify
typeYesType of code to format
indentSizeNoNumber of spaces for indentation
Behavior3/5

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

Annotations provide readOnlyHint: false, indicating this is not a read-only operation, but the description doesn't add significant behavioral context beyond that. It mentions 'beautify' which suggests aesthetic formatting, but doesn't disclose details like error handling for malformed code, performance implications, or output format. With annotations covering the read/write aspect, the description adds minimal value, earning a baseline score.

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?

The description is a single, efficient sentence: 'Format and beautify JavaScript/CSS code.' It's front-loaded with the core purpose, has zero redundant words, and appropriately sized for the tool's complexity. Every word earns its place.

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?

Given the tool's moderate complexity (3 parameters, 100% schema coverage, no output schema), the description is minimally adequate. It states what the tool does but lacks context on output format, error handling, or differentiation from format_css. With no output schema, the description doesn't explain return values, leaving gaps in completeness.

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 schema fully documents all parameters (code, type, indentSize). The description mentions 'JavaScript/CSS code' which aligns with the 'type' parameter's enum, but adds no extra semantic details beyond what's in the schema (e.g., formatting rules or examples). This meets the baseline for high schema coverage.

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 clearly states the tool's purpose: 'Format and beautify JavaScript/CSS code' with specific verbs ('format', 'beautify') and resources ('JavaScript/CSS code'). It distinguishes from most siblings (e.g., format_json, format_sql) by specifying JavaScript/CSS, though format_css exists as a potential overlap. However, it doesn't explicitly differentiate from format_css, which slightly reduces clarity.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like format_css (for CSS-only formatting) or other code formatting tools, nor does it specify prerequisites or exclusions (e.g., whether it handles invalid code). Usage is implied by the name and description but not explicitly stated.

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/wrenchpilot/it-tools-mcp'

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