Skip to main content
Glama
KoyoYeager

io.github.KoyoYeager/pystub

by KoyoYeager

analyze

Analyzes import graphs from a project entry point to automatically classify packages as stubbable, nofollow, or required based on usage, helping reduce executable size by generating stub code.

Instructions

プロジェクトのエントリーポイントから import グラフを解析し、 スタブ置換可能なパッケージを自動検出します。

各パッケージは以下のいずれかに判定されます:

  • stubbable: スタブ化可能(プロジェクトの実行パスで未使用)

  • nofollow: try/except 保護あり(--nofollow-import-to で除外推奨)

  • required: スタブ化不可(実際に使用されている)

Args: entry_point: プロジェクトのエントリーポイントファイルパス python_path: site-packages パス(空の場合は現在の環境を自動検出) max_depth: import グラフの最大探索深度(デフォルト: 10)

Returns: stubbable / nofollow / required に分類されたパッケージ一覧

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entry_pointYes
python_pathNo
max_depthNo
Behavior4/5

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

With no annotations provided, the description fully handles behavioral disclosure: it explains the analysis process and classification logic. However, it omits details like error handling, performance, or whether it modifies files, which would be needed for a perfect score.

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 description is well-structured with a clear introduction, bullet points for classifications, and an Args/Returns section. It is appropriately sized, though a slightly more concise phrasing could improve it.

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?

The description is complete for a tool with no output schema: it details the return value (classified package list) and the three possible classifications, providing sufficient context for agent invocation.

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?

The description provides clear semantics for all three parameters in the 'Args' section, explaining their purpose and defaults (e.g., max_depth default 10). This fully compensates for the 0% schema description coverage.

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 description clearly states the tool analyzes import graphs from an entry point and detects stubbable packages, with specific classification outcomes. This distinct purpose differentiates it from siblings like 'generate' or 'graph'.

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 description implies usage by explaining classifications and recommending exclusions for nofollow packages, but does not explicitly state when to use this tool vs. alternatives or provide context for when not to use it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/KoyoYeager/mcp-pystub'

If you have feedback or need assistance with the MCP directory API, please join our Discord server