Skip to main content
Glama

docvet_check

Check Python files for docstring quality issues, running configurable rules and returning JSON findings with fix guidance.

Instructions

Run docvet checks on Python files.

Analyzes Python source files for docstring quality issues. Runs all
enabled checks except freshness by default (freshness requires git
context; griffe also excluded when not installed). When *path* is a
directory, only files within that directory tree are checked (not the
entire project). Returns a JSON object with findings, summary
statistics, and optional presence coverage data. Invalid
configuration triggers a structured error response instead of
crashing the server.

Args:
    path: Path to a Python file or directory to check.
    checks: Optional list of check names to run. Valid names are
        ``presence``, ``enrichment``, ``freshness``, ``coverage``,
        ``griffe``. Defaults to all except freshness.

Returns:
    JSON string with ``findings``, ``summary``, and optionally
    ``presence_coverage`` keys. Returns an ``error`` key on
    invalid path, unknown check name, or malformed configuration.
    Call docvet_rules() for per-rule fix guidance and format examples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
checksNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.16.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so: it discloses the default check set, the conditional exclusions and their reasons, the directory-scoping rule (only files in that tree, not the whole project), the return shape including optional keys, and error behavior ('Invalid configuration triggers a structured error response instead of crashing the server'). That is unusually complete behavioral disclosure.

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?

The key behavior (defaults, exclusions, scoping) is front-loaded before the Args/Returns block, and every sentence carries information. It is somewhat long, and the Returns section partly duplicates the existing output schema, so it is efficient rather than maximally tight.

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

Completeness5/5

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

For a two-parameter tool with an output schema and no annotations, the description covers selection of checks, defaults, conditional exclusions, scoping semantics, error modes, and a sibling cross-reference. Nothing an agent needs to invoke it correctly is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does: it enumerates the valid check names (presence, enrichment, freshness, coverage, griffe) that the schema leaves as an unconstrained array of strings, and defines path as a Python file or directory. This adds substantial meaning beyond the bare schema.

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 opening states a specific verb and resource: 'Run docvet checks on Python files' and 'Analyzes Python source files for docstring quality issues.' It also distinguishes itself from the only sibling by routing the agent to docvet_rules() for per-rule fix guidance, so the agent can tell the two apart without opening either schema.

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?

It explains the default behavior ('all enabled checks except freshness') and the conditions that change it ('freshness requires git context; griffe also excluded when not installed'), plus a pointer to the sibling for a different task. It does not give an explicit 'do not use this when...' exclusion, which keeps it just short of a 5.

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

Deploy Server

Other Tools