Skip to main content
Glama

Google Analytics 4 MCP by InsightfulPipe

GA4 Execute Action

execute_action
Destructive

Execute Google Analytics actions (Step 3 FINAL).

Prerequisites: Run query_contexts with request='accounts' (includes available_requests) + request='actions_details' to understand the required payload.

IMPORTANT: The 'body' parameter is a dictionary that must contain ALL fields including:

  • action: Table/action name (e.g. 'runReport', 'runRealtimeReport')

  • workspace_id: Integer workspace ID

  • brand_id: Integer brand ID

  • property_id: GA4 property identifier

  • Any other fields from the helper response (filters, date ranges, dimensions, metrics, etc.)

Do NOT pass these as separate parameters - they must ALL be inside the body dictionary.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "body": "<body>"
    },
    "name": "execute_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, openWorldHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds valuable behavioral context by emphasizing that the body dictionary must contain ALL fields, including action name and IDs, and that fields must not be passed separately. It could say more about side effects or failure behavior, but the key payload constraint is disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action and final-step positioning, then provides prerequisites and a structured payload reminder. The bullet list and bold warning are purposeful, and every sentence contributes to correct invocation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a dynamic body parameter, destructive annotations, and an existing output schema, the description supplies the missing invocation context: prerequisites, payload assembly rules, and relationship to helper responses. Nothing critical for calling the tool correctly appears absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for the single dynamic 'body' object. It does so well by naming required fields (action, workspace_id, brand_id, property_id), giving example action values, and explaining that other fields come from the helper response. It cannot enumerate every dynamic field, but it provides enough semantic guidance to construct the payload.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Execute Google Analytics actions') and explicitly positions itself as 'Step 3 FINAL,' distinguishing it from the sibling query tools. The agent can tell this is the execution endpoint rather than a query or menu tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states prerequisites: run query_contexts with request='accounts' (including available_requests) and request='actions_details' first. This gives clear when-to-use guidance and routes the agent through the required prior steps before invoking execute_action.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.