Skip to main content
Glama

find_unused_imports

Lists unused import statements in a Python repository and skips intentional re-exports marked with # noqa: F401 to identify cleanup targets.

Instructions

List unused import statements in a Python repo. Honours # noqa: F401 annotations to skip intentional re-exports.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo_path": "<repo_path>"
    },
    "name": "find_unused_imports"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
repo_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, and it only discloses one non-obvious trait (skipping `# noqa: F401`). It never says whether the operation is read-only, whether scanning is recursive over the whole repo or limited to repo_path, whether it mutates anything, how failures (unparseable files) are handled, or anything about cost. For a repo-scanning tool with zero annotation coverage this is thin.

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 action and target, with no filler or redundancy. Every sentence carries information.

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?

The presence of an output schema means return values need not be described, but with no annotations and 0% parameter coverage the description should compensate by explaining path semantics and the limit's effect, and it does not. Given a filesystem-scanning tool, an agent has to guess at scope and behavior before calling.

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% and the description adds no meaning for either parameter. An agent cannot tell whether repo_path is a repo root or an arbitrary subdirectory, nor what `limit` bounds (files scanned vs. findings returned) or what happens at the default of 100.

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 ("List unused import statements in a Python repo") with a clear analysis target, so an agent can distinguish it from siblings like find_dead_code or find_complexity. It stops short of explicitly contrasting with the nearest sibling, so it lands at 4 rather than 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?

Usage is only implied by the linting/static-analysis framing; there is no statement of when to pick this over find_dead_code or general linting, and no prerequisites (Python version, install state, whether the repo must parse). The noqa note hints at the intentional-re-export scenario but is a behavior, not routing guidance.

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