Skip to content

Commit a0f020f

Browse files
authored
fix: make get_property_details async (#33)
1 parent 499ea8c commit a0f020f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

analytics_mcp/tools/admin/info.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ async def list_google_ads_links(property_id: int | str) -> List[Dict[str, Any]]:
6060

6161

6262
@mcp.tool(title="Gets details about a property")
63-
def get_property_details(property_id: int | str) -> Dict[str, Any]:
63+
async def get_property_details(property_id: int | str) -> Dict[str, Any]:
6464
"""Returns details about a property.
6565
Args:
6666
property_id: The Google Analytics property ID. Accepted formats are:
6767
- A number
6868
- A string consisting of 'properties/' followed by a number
6969
"""
70-
client = admin_v1beta.AnalyticsAdminServiceClient()
70+
client = create_admin_api_client()
7171
request = admin_v1beta.GetPropertyRequest(
7272
name=construct_property_rn(property_id)
7373
)
74-
response = client.get_property(request=request)
74+
response = await client.get_property(request=request)
7575
return proto_to_dict(response)

0 commit comments

Comments
 (0)