Skip to main content
Glama

Python type check (structured)

python_typecheck
Read-only

Run mypy on Python code and return structured type errors with file, line, column, message, and error code, making diagnostics easier to parse and act on.

Instructions

Run mypy and return structured type errors with file, line, column, message, and error code. Much more compact than raw mypy output.

Input Schema

NameRequiredDescriptionDefault
cwdYesProject root directory
pathsNoSpecific path(s) to check; a string or array (default: '.')
maxItemsNoItem cap; overrides detailLevel
detailLevelNoItem preset: summary 20, normal 100, full (default; also skips the response budget)

Output Schema

NameRequiredDescriptionDefault
totalNo
errorsYes
successYes
retainedNo
truncatedNo
errorCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds that output is structured and compact, which is useful context, but says nothing about exit-code behavior, timeout, missing mypy, or how errors are capped by maxItems/detailLevel.

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 short sentences, front-loaded with the verb and action, then the value proposition. No waste.

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?

An output schema exists, so return values need not be explained, and the read-only annotation covers safety. The description is sufficient to invoke correctly, with only minor gaps (prerequisites, error handling) remaining.

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 coverage is 100% and all four parameters are documented in the schema, including the detailLevel preset and maxItems override. The description adds no parameter meaning beyond that, so baseline 3 applies.

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 and resource: runs mypy and returns structured type errors with named fields. Clearly a type-checking tool distinguishable from python_lint and python_test by the mypy reference, though it does not explicitly name those siblings.

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?

Implies use over raw mypy output ('much more compact than raw mypy output') but gives no explicit when-to-use/when-not guidance, no prerequisites such as a mypy config or installation, and no mention of the lint/test siblings.

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