tools/payments/
) might need to share utility functions, client initializations, or Pydantic models. For this, GolfMCP supports common.py
files.
common.py
in any subdirectory of tools/
, resources/
, or prompts/
can contain shared code.common.py
using relative imports.tools/payments/common.py
:
tools/payments/charge.py
:
common.py
modules are correctly packaged and accessible in the final dist/
output. The ImportTransformer
in golf.core.transformer
handles rewriting these imports to be absolute paths relative to the generated components
directory structure.