Skip to main content
Glama
googleanalytics

Google Analytics MCP Server

Official

get_account_summaries

Retrieve detailed summaries of Google Analytics accounts and properties to manage and analyze data effectively.

Instructions

Retrieves information about the user's Google Analytics accounts and properties.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_account_summaries' tool, decorated with @mcp.tool() which likely handles registration and schema inference from the function signature and types. It fetches account summaries from the Google Analytics Admin API using an async pager and converts protos to dicts.
    @mcp.tool() async def get_account_summaries() -> List[Dict[str, Any]]: """Retrieves information about the user's Google Analytics accounts and properties.""" # Uses an async list comprehension so the pager returned by # list_account_summaries retrieves all pages. summary_pager = await create_admin_api_client().list_account_summaries() all_pages = [ proto_to_dict(summary_page) async for summary_page in summary_pager ] return all_pages

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