Skip to main content
Glama

Format code for automation platforms

format_code
Read-only

Format and lint JavaScript, Python, or HubL code for Zapier, n8n, Pipedream, Make, or HubSpot. Wraps the source in each platform's runtime shell before formatting so top-level await, bare return, and injected globals don't break the formatter. Returns formatted code plus lint diagnostics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesSource code to format (≤50KB).
languageNoDefaults to javascript. zapier, n8n, pipedream, make, and hubspot support python; hubl does not.
platformYesTarget automation platform.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description reveals non-obvious behavior: it wraps source in platform-specific runtime shells so top-level await, bare return, and injected globals don't break formatting. It also states the return payload is formatted code plus lint diagnostics, which is valuable because no output schema exists.

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 sentences with no filler. The main action and scope are front-loaded, the runtime-wrapping detail earns its place, and the return behavior is stated clearly. Every sentence contributes essential information.

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?

The description covers supported languages/platforms, the key formatting behavior, and return values despite having no output schema. It is missing explicit guidance on how HubL relates to the language and platform parameters and does not mention alternatives, but the core calling context is sufficiently complete.

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

Parameters4/5

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

Since schema description coverage is 100%, the baseline is 3. The description adds meaning by explaining why code may contain top-level await or bare returns and that platform determines the runtime shell. This goes beyond the schema's parameter descriptions, though the HubL/language mismatch keeps it from being fully precise.

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 ('Format and lint') and a clear resource ('JavaScript, Python, or HubL code for Zapier, n8n, Pipedream, Make, or HubSpot'), which distinguishes it from the JSON-focused format_json. However, it lists 'HubL code' while the input schema's language enum only supports javascript and python, creating a mild ambiguity about how HubL is selected.

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

Usage Guidelines4/5

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

The description establishes clear context: use this for JS/Python/HubL code destined for specific automation platforms. It does not explicitly state when not to use it or mention alternatives such as format_json, but the platform/language scope is concrete enough to guide selection.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: ask_codefmt answers questions about the tool itself, format_code formats and lints code in specific languages/platforms, and format_json handles JSON formatting. There is no overlap between these three tools.

Naming Consistency5/5

All tool names follow a consistent verb_target pattern using lowercase and underscores (ask_codefmt, format_code, format_json). The verbs are descriptive and the naming style is uniform throughout.

Tool Count5/5

Three tools is an appropriate, well-scoped count for a formatting-focused server. Each tool covers a distinct, necessary operation without redundancy or bloat.

Completeness5/5

The tool set covers the core functionality: asking questions about the server, formatting code with lint diagnostics (in supported languages/platforms), and formatting JSON. For the stated domain, there are no obvious missing operations.

Resources