Skip to main content
Glama
banderzhm
by banderzhm

format

Format C++ and module source files using clangd. Preview formatting by default, or apply changes directly to update the file and clangd index.

Instructions

Format C++/module source with clangd. Preview is the default; apply=true explicitly writes the file and updates clangd.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
applyNo
tabSizeNo
insertSpacesNo
Behavior4/5

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

With no annotations present, the description carries the full burden of disclosing side effects. It clearly states that preview is the default and that apply=true explicitly writes the file and updates clangd, which is critical safety information for an agent deciding whether invocation may mutate state.

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 deliver the core purpose, the engine, the default mode, and the explicit mutation mode. There is no filler or redundancy, and the most important safety detail is placed in the second sentence.

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?

The description covers the key purpose and preview/apply distinction, which is essential for safe invocation. However, it does not explain what the preview output looks like, what happens if the file is not part of the current workspace, or how `tabSize` and `insertSpaces` affect the result, leaving noticeable gaps for a 4-parameter tool with no annotations.

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?

The schema has no parameter descriptions and the description only explains the `apply` parameter semantics. `file` is only implied by 'source,' while `tabSize` and `insertSpaces` are not explained at all despite being meaningful formatting controls.

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 a specific action ('Format') applied to a specific resource ('C++/module source') and names the engine ('clangd'). It also distinguishes itself from the sibling workspace, module, and diagnostics tools by identifying the formatting operation.

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 provides clear guidance on default behavior versus opt-in mutation: preview by default, apply=true to write. While it does not explicitly name excluded alternatives, the sibling list contains no competing format tool, so the usage context is reasonably clear.

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/banderzhm/ModAST-MCP'

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