Understand GolfMCP project layout and component naming conventions.
golf.json
: The main configuration file (see Configuration)..env
: Stores environment variables. Loaded by the built server.pre_build.py
: Optional script for pre-build tasks, like auth setup.tools/
: Contains Python files defining your server’s tools (callable functions).resources/
: Contains Python files defining data resources the LLM can read.prompts/
: Contains Python files defining reusable prompt templates..py
file within tools/
, resources/
, or prompts/
(and their subdirectories) is treated as a single component.__init__.py
are ignored for direct component definition but are essential for Python’s packaging if you structure your components as modules.common.py
are special and used for shared code (see common.py
section).tools
, resources
, prompts
).
Examples:
tools/hello.py
-> ID: hello
tools/payments/transaction/submit.py
-> ID: submit-transaction-payments
resources/weather/current.py
-> ID: current-weather