googleanalytics / googleanalytics/google-analytics-mcp

Reduce the token count of get_account_summaries

Open
#69 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
3.2k
Forks
693
PR merge metrics
No merged PRs in 30d

Description

Describe the problem you are trying to solve:
I work for an digital marketing agency and we have access hundreds of GA4 accounts. That makes the get_account_summaries response very token heavy. I would argue that there is too much info in that response that is not needed most of the time.

Describe the solution you'd like:
On the account:
name:"accountSummaries/XXX"
account:"accounts/XXX"
The name is just the ID (at least for all accounts I have access to. Name could be removed
On the property:
the property_type
parent
Does not bring valuable information in my opinion. The "parent" property is redundant as the parent is also returned.

Describe alternatives you've considered:
Perhaps a search function for accounts/properties.

Additional context:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the get_account_summaries entry point and inspect how account and property responses are assembled. Determine which requested fields can be omitted without breaking the API, then verify that summaries contain the intended reduced set of fields and that existing behavior remains covered by the project's tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.