Skip to main content
Glama

format_code

Format Python code with Ruff, or use check-only mode to report formatting issues without modifying files.

Instructions

Format Python code with ruff; check_only=True only reports.

Input Schema

NameRequiredDescriptionDefault
cwdNo
pathNo.
check_onlyNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose the safety-relevant fact that check_only=True is report-only, but it never states what happens when check_only=False — presumably in-place file modification — nor whether it touches one file or a whole tree, which for an un-annotated mutating tool is a notable gap.

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 dense sentence with the mutating verb front-loaded and no filler. It is arguably too terse rather than verbose, which is a completeness problem, not a conciseness one.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need no explanation, but the description leaves critical gaps for a tool that can rewrite files: no in-place vs preview default, no path scope semantics, and no cwd meaning. For a three-parameter mutation tool with zero annotation and zero schema-description coverage, this is under-specified.

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?

Schema description coverage is 0% across three parameters, and the description only glosses `check_only`. `path` (default '.') is entirely undefined — file or directory, recursive or not — and `cwd` is never mentioned, so the description fails to compensate for the empty schema documentation.

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?

States a specific verb (format), a specific resource (Python code), and the engine (ruff), which cleanly separates it from the sibling `lint` tool. It does not explicitly name that sibling or contrast itself with it, 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?

The clause 'check_only=True only reports' implies a preview-vs-apply usage mode, which is genuinely useful context. However, it never says when to pick this over `lint` (a very close sibling) or that the default is the non-mutating mode, so usage is only implied rather than guided.

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