Skip to main content
Glama

Python lint (structured)

python_lint

Run Ruff lint checks on Python projects and return compact structured diagnostics with file, line, column, message, and rule code; filter by severity and optionally auto-fix safe issues.

Instructions

Run ruff check and return structured diagnostics with file, line, column, message, and rule code. Much more compact than raw ruff output. Use minSeverity to filter by severity level.

Input Schema

NameRequiredDescriptionDefault
cwdYesProject root directory
fixNoAuto-fix safe issues (default: false)
pathsNoSpecific path(s) to lint; a string or array (default: '.')
maxItemsNoItem cap; overrides detailLevel
detailLevelNoItem preset: summary 20, normal 100, full (default; also skips the response budget)
minSeverityNoMinimum severity to include (e.g. 'error' drops warnings and info)

Output Schema

NameRequiredDescriptionDefault
totalNo
errorsYes
retainedNo
truncatedNo
errorCountYes
fixedCountYes
warningCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.1

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden. It covers the return format and compactness, but never states that fix=true writes changes to files, whether lint findings cause a non-zero exit, or that ruff must be available in the environment — significant omissions for a tool with a mutating mode.

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?

Three short sentences, front-loaded with the core action and return shape, with no filler. The 'more compact than raw ruff output' sentence is a useful framing detail, though the final minSeverity sentence duplicates schema content.

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?

An output schema exists, so return values need not be re-explained, and the schema documents all six parameters. However, with zero annotations the description should compensate for the missing safety/mutation profile of fix mode and the environment expectation; it does not.

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%, including per-parameter docs and enum explanations for detailLevel and minSeverity, so the schema already does the heavy lifting. The description's only parameter remark repeats what the schema says about minSeverity, adding no syntax or interaction detail (e.g. how maxItems overrides detailLevel).

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?

States a specific verb and resource ('Run ruff check') and describes the exact return shape (file, line, column, message, rule code). Naming ruff makes it clearly the Python linter among the lint siblings (npm_lint, bash_lint), so an agent can select it without opening the schema.

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?

Only guidance is 'Use minSeverity to filter by severity level', which is a parameter hint rather than a when-to-use rule. There is no statement about when to prefer this over python_typecheck, bash_lint, or raw shelling out, and no warning about when not to use fix mode.

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