golf-mcp 0.2.4__py3-none-any.whl → 0.2.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of golf-mcp might be problematic. Click here for more details.
- golf/__init__.py +1 -1
- golf/examples/basic/resources/weather/city.py +3 -3
- golf/examples/basic/resources/weather/{common.py → client.py} +3 -2
- golf/examples/basic/resources/weather/current.py +3 -3
- golf/examples/basic/resources/weather/forecast.py +3 -3
- {golf_mcp-0.2.4.dist-info → golf_mcp-0.2.5.dist-info}/METADATA +1 -1
- {golf_mcp-0.2.4.dist-info → golf_mcp-0.2.5.dist-info}/RECORD +11 -11
- {golf_mcp-0.2.4.dist-info → golf_mcp-0.2.5.dist-info}/WHEEL +0 -0
- {golf_mcp-0.2.4.dist-info → golf_mcp-0.2.5.dist-info}/entry_points.txt +0 -0
- {golf_mcp-0.2.4.dist-info → golf_mcp-0.2.5.dist-info}/licenses/LICENSE +0 -0
- {golf_mcp-0.2.4.dist-info → golf_mcp-0.2.5.dist-info}/top_level.txt +0 -0
golf/__init__.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
|
-
from .
|
|
6
|
+
from .client import weather_client
|
|
7
7
|
|
|
8
8
|
# The URI template that clients will use to access this resource
|
|
9
9
|
# The {city} parameter makes this a resource template
|
|
@@ -16,7 +16,7 @@ async def get_weather_for_city(city: str) -> dict[str, Any]:
|
|
|
16
16
|
This example demonstrates:
|
|
17
17
|
1. Resource templates with URI parameters ({city})
|
|
18
18
|
2. Dynamic resource access based on parameters
|
|
19
|
-
3. Using shared client from the
|
|
19
|
+
3. Using shared client from the client.py file
|
|
20
20
|
4. FastMCP 2.11+ ResourceTemplate.from_function() usage
|
|
21
21
|
|
|
22
22
|
Args:
|
|
@@ -25,7 +25,7 @@ async def get_weather_for_city(city: str) -> dict[str, Any]:
|
|
|
25
25
|
Returns:
|
|
26
26
|
Weather data for the specified city
|
|
27
27
|
"""
|
|
28
|
-
# Use the shared weather client from
|
|
28
|
+
# Use the shared weather client from client.py
|
|
29
29
|
weather_data = await weather_client.get_current(city)
|
|
30
30
|
|
|
31
31
|
# Add some additional data
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"""Weather shared functionality.
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This file demonstrates the recommended pattern for
|
|
4
4
|
sharing functionality across multiple resources in a directory.
|
|
5
|
+
Golf automatically discovers and includes shared Python files in builds.
|
|
5
6
|
"""
|
|
6
7
|
|
|
7
8
|
import os
|
|
@@ -44,4 +45,4 @@ class WeatherApiClient:
|
|
|
44
45
|
weather_client = WeatherApiClient()
|
|
45
46
|
|
|
46
47
|
# This could also define shared models or other utilities
|
|
47
|
-
# that would be common across weather-related resources
|
|
48
|
+
# that would be common across weather-related resources
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
|
-
from .
|
|
6
|
+
from .client import weather_client
|
|
7
7
|
|
|
8
8
|
# The URI that clients will use to access this resource
|
|
9
9
|
resource_uri = "weather://current"
|
|
@@ -15,9 +15,9 @@ async def current_weather() -> dict[str, Any]:
|
|
|
15
15
|
This example demonstrates:
|
|
16
16
|
1. Nested resource organization (resources/weather/current.py)
|
|
17
17
|
2. Resource without URI parameters
|
|
18
|
-
3. Using shared client from the
|
|
18
|
+
3. Using shared client from the client.py file
|
|
19
19
|
"""
|
|
20
|
-
# Use the shared weather client from
|
|
20
|
+
# Use the shared weather client from client.py
|
|
21
21
|
weather_data = await weather_client.get_current("New York")
|
|
22
22
|
|
|
23
23
|
# Add some additional data
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
|
-
from .
|
|
6
|
+
from .client import weather_client
|
|
7
7
|
|
|
8
8
|
# The URI that clients will use to access this resource
|
|
9
9
|
resource_uri = "weather://forecast"
|
|
@@ -15,9 +15,9 @@ async def forecast_weather() -> dict[str, Any]:
|
|
|
15
15
|
This example demonstrates:
|
|
16
16
|
1. Nested resource organization (resources/weather/forecast.py)
|
|
17
17
|
2. Resource without URI parameters
|
|
18
|
-
3. Using shared client from the
|
|
18
|
+
3. Using shared client from the client.py file
|
|
19
19
|
"""
|
|
20
|
-
# Use the shared weather client from
|
|
20
|
+
# Use the shared weather client from client.py
|
|
21
21
|
forecast_data = await weather_client.get_forecast("New York", days=5)
|
|
22
22
|
|
|
23
23
|
# Add some additional data
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
golf/__init__.py,sha256=
|
|
1
|
+
golf/__init__.py,sha256=pjc5BpzhL3Rn_QfzuqOyLUq-KgJ0p4QvvBcMgLuFU8I,306
|
|
2
2
|
golf/_endpoints.py,sha256=-mvAmjx3YtqfAdajO13Kv7LKVBMdqsKqX0_3aCmCK4I,317
|
|
3
3
|
golf/_endpoints.py.in,sha256=MeqcSF6xinnPknpBGF26xA9FYmSYKSWqCFXOSDlXiOA,216
|
|
4
4
|
golf/_endpoints_fallback.py,sha256=CD6m45Ams1A9HVKowY8dCFUDMiFmJ8ZWSwHCENvU5u4,386
|
|
@@ -33,10 +33,10 @@ golf/examples/basic/golf.json,sha256=327fO4XmvksmZdlYtYPmRcB6TgEVkD1nSvHAuGyWsYA
|
|
|
33
33
|
golf/examples/basic/prompts/welcome.py,sha256=xyW4pwvpcPQi0_H9tP7OX53Kv62R1aCYcVq9xMw147k,760
|
|
34
34
|
golf/examples/basic/resources/current_time.py,sha256=bJMrRZQ0WPgnQxMl_4-4ynZyq7ki-wGMbMFpaYOH7PY,859
|
|
35
35
|
golf/examples/basic/resources/info.py,sha256=LxHzg_TmwonSu1vSkuNcpUq5JrBu-9yzoGaARE1f2KU,727
|
|
36
|
-
golf/examples/basic/resources/weather/city.py,sha256=
|
|
37
|
-
golf/examples/basic/resources/weather/
|
|
38
|
-
golf/examples/basic/resources/weather/current.py,sha256=
|
|
39
|
-
golf/examples/basic/resources/weather/forecast.py,sha256=
|
|
36
|
+
golf/examples/basic/resources/weather/city.py,sha256=pRgceEP4ZRDVFEJA4kQf54n0pb37TMdFLgqFL1cHZZs,1278
|
|
37
|
+
golf/examples/basic/resources/weather/client.py,sha256=Qyj72OeRFaPtb0tLUerPgIhNuENeqb_u36wSzqP3Nuc,1678
|
|
38
|
+
golf/examples/basic/resources/weather/current.py,sha256=muT77pUxnHQJSnrX5x4itzrjTSzK_hPbbkjVh3LGlh4,933
|
|
39
|
+
golf/examples/basic/resources/weather/forecast.py,sha256=xhSpK71gWsCIpyzYyqY7KhoUHn38xpR6srZ-2Vqww8Q,990
|
|
40
40
|
golf/examples/basic/tools/calculator.py,sha256=QTDvE7ItMol2eIR1mgc6moRhhl3p-q63bgieWr5yF5c,3070
|
|
41
41
|
golf/examples/basic/tools/say/hello.py,sha256=zTfR-M2ElhrBF5Q2QHeKGORWLGxnvtErUjzw3YEuzpg,2006
|
|
42
42
|
golf/metrics/__init__.py,sha256=O91y-hj_E9R06gqV8pDZrzHxOIl-1T415Hj9RvFAp3o,283
|
|
@@ -48,9 +48,9 @@ golf/utilities/__init__.py,sha256=X9iY9yi3agz1GVcn8-qWeOCt8CSSsruHxqPNtiF63TY,53
|
|
|
48
48
|
golf/utilities/context.py,sha256=DGGvhVe---QMhy0wtdWhNp-_WVk1NvAcOFn0uBKBpYo,1579
|
|
49
49
|
golf/utilities/elicitation.py,sha256=MParZZZsY45s70-KXduHa6IvpWXnLW2FCPfrGijMaHs,5223
|
|
50
50
|
golf/utilities/sampling.py,sha256=88nDv-trBE4gZQbcnMjXl3LW6TiIhv5zR_cuEIGjaIM,7233
|
|
51
|
-
golf_mcp-0.2.
|
|
52
|
-
golf_mcp-0.2.
|
|
53
|
-
golf_mcp-0.2.
|
|
54
|
-
golf_mcp-0.2.
|
|
55
|
-
golf_mcp-0.2.
|
|
56
|
-
golf_mcp-0.2.
|
|
51
|
+
golf_mcp-0.2.5.dist-info/licenses/LICENSE,sha256=5_j2f6fTJmvfmUewzElhkpAaXg2grVoxKouOA8ihV6E,11348
|
|
52
|
+
golf_mcp-0.2.5.dist-info/METADATA,sha256=LBA45kjycZuDRt4HHmhH770mcj9yqugCv_FsEaomoGU,9558
|
|
53
|
+
golf_mcp-0.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
54
|
+
golf_mcp-0.2.5.dist-info/entry_points.txt,sha256=5y7rHYM8jGpU-nfwdknCm5XsApLulqsnA37MO6BUTYg,43
|
|
55
|
+
golf_mcp-0.2.5.dist-info/top_level.txt,sha256=BQToHcBUufdyhp9ONGMIvPE40jMEtmI20lYaKb4hxOg,5
|
|
56
|
+
golf_mcp-0.2.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|