Skip to main content
Glama
KoyoYeager

io.github.KoyoYeager/pystub

by KoyoYeager

generate_submodule

Generates submodule stubs to indirectly eliminate C extension packages from executable builds. Uses analysis hints to produce stub code, backup, and verification steps.

Instructions

C拡張パッケージを間接排除するためのサブモジュールスタブを生成します。

PySide6 のような C拡張パッケージは直接スタブ化できませんが、 そのパッケージを import しているサブモジュール(例: asammdf.gui)を スタブ化することで間接的に排除できます。

analyze ツールの結果に含まれる submodule_stub_hints の情報を元に このツールを使用してください。

復元失敗を防ぐため、バックアップ・バージョン固定・検証ステップを 含むビルド手順を生成します。

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

Returns: files: {相対パス: コード内容} の辞書 eliminated_packages: 排除されるパッケージ一覧 build_instructions: バックアップ・適用・復元・検証の手順

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entry_pointYes
parent_packageYes
submoduleYes
python_pathNo
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses that the tool generates build instructions including backup and verification to prevent recovery failure, but does not detail side effects, permissions, or 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?

The description is well-structured with a clear purpose statement, usage context, parameter list, and return description. It is appropriately sized, though some redundancy exists.

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

Completeness3/5

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

Given the complexity (4 parameters, no output schema, no annotations), the description covers purpose, usage context, and return format adequately. However, it omits error conditions, prerequisites, and differentiation from sibling tools.

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?

The input schema has 0% description coverage, and the description compensates by briefly explaining each parameter with examples. However, the explanations are not exhaustive and lack constraints or validation details.

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?

The description clearly states that the tool generates a submodule stub for indirectly excluding C extension packages that cannot be directly stubbed. It specifies the use case and resource, but does not explicitly differentiate from the sibling 'generate' tool.

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?

The description instructs to use this tool based on 'submodule_stub_hints' from the 'analyze' tool, providing clear context. However, it lacks explicit exclusion criteria or alternatives 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