Skip to main content
Glama
KoyoYeager

io.github.KoyoYeager/pystub

by KoyoYeager

generate

Generates minimal stub code for specified Python packages, using symbols referenced from an entry point, to reduce executable size.

Instructions

stubbable パッケージの最小スタブコードを生成します。

analyzer が特定した参照シンボルに基づき、import が通る最小限の ダミーモジュール(クラス定義 + 関数スタブ)を生成します。 ファイルの書き出しは行わず、{パス: コード} の辞書を返します。

Args: entry_point: プロジェクトのエントリーポイントファイルパス package_name: スタブ化するパッケージ名(例: "pandas") python_path: site-packages パス(空の場合は現在の環境を自動検出)

Returns: files: {相対パス: コード内容} の辞書 referenced_symbols: 各モジュールで参照されるシンボル一覧 stub_total_bytes: スタブの合計サイズ

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entry_pointYes
package_nameYes
python_pathNo
Behavior4/5

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

Discloses key behaviors: generates based on symbol references, writes no files, returns a dictionary. With no annotations, description carries full burden and does so adequately, though could mention error handling.

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?

Moderate length with a logical structure: purpose, process, return format, parameters. No extraneous text, but could be slightly more concise.

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?

Covers purpose, process, parameters, and return values. Without output schema, it lists return keys (files, referenced_symbols, stub_total_bytes), providing sufficient context for a generate tool.

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 has 0% description coverage; the description provides clear explanations for all three parameters in an 'Args' section, fully compensating for missing schema descriptions.

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?

Clearly states it generates minimal stub code for a stubbable package, specifying verb and resource. However, does not explicitly differentiate from sibling tool 'generate_submodule', leaving some ambiguity about scope.

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?

No guidance on when to use this tool versus alternatives like 'analyze' or 'generate_submodule'. The description is purely functional, lacking context for selection.

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