Skip to main content
Glama
googleanalytics

Google Analytics MCP Server

Official

get_property_details

Retrieve detailed information about a Google Analytics property by providing its ID in numeric or formatted string format.

Instructions

Returns details about a property. Args: property_id: The Google Analytics property ID. Accepted formats are: - A number - A string consisting of 'properties/' followed by a number

Input Schema

NameRequiredDescriptionDefault
property_idYes

Input Schema (JSON Schema)

{ "properties": { "property_id": { "anyOf": [ { "type": "integer" }, { "type": "string" } ], "title": "Property Id" } }, "required": [ "property_id" ], "title": "get_property_detailsArguments", "type": "object" }

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the get_property_details tool logic. It retrieves property details using the Google Analytics Admin API.
    @mcp.tool(title="Gets details about a property") async def get_property_details(property_id: int | str) -> Dict[str, Any]: """Returns details about a property. Args: property_id: The Google Analytics property ID. Accepted formats are: - A number - A string consisting of 'properties/' followed by a number """ client = create_admin_api_client() request = admin_v1beta.GetPropertyRequest( name=construct_property_rn(property_id) ) response = await client.get_property(request=request) return proto_to_dict(response)

Other Tools

Related 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/googleanalytics/google-analytics-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server