[
  {
    "name": "ga4_list_account_summaries",
    "title": "List GA4 Accounts & Properties",
    "description": "List every GA4 account and property visible to the connected Google account (Admin API accountSummaries).\n\nUse this tool first to discover which properties are available before calling other GA4 tools.\nResults are cached; pass refresh=true only when you need the latest list.\n\nArgs:\n  limit (number, optional): Max accounts per page (default 20, max 200).\n  cursor (string, optional): Opaque pagination cursor from a previous response's pagination.nextCursor.\n  refresh (bool, optional): Force a fresh fetch from the API, bypassing cache. Default: false.\n\nReturns:\n  data: accounts (each with account resource name, display_name, and properties[] of { property_id, display_name, property_type, parent }).\n  count (total accounts), property_count (total properties), cached, synced_at, and pagination { hasMore, nextCursor }.",
    "cli_command": "hopkin ga4 -account-summaries",
    "cli_flags": [
      {
        "flag": "--limit",
        "description": "Max accounts per page (default 20).",
        "type": "integer",
        "required": false
      },
      {
        "flag": "--cursor",
        "description": "Opaque pagination cursor from a previous response's pagination.nextCursor. Do not construct by hand.",
        "type": "string",
        "required": false
      },
      {
        "flag": "--refresh",
        "description": "Force a fresh fetch from the Admin API, bypassing the cache. Default: false.",
        "type": "boolean",
        "required": false
      }
    ],
    "category": "-account-summaries",
    "annotations": {
      "readOnly": true,
      "destructive": false,
      "idempotent": false,
      "openWorld": true
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 200,
          "description": "Max accounts per page (default 20)."
        },
        "cursor": {
          "type": "string",
          "description": "Opaque pagination cursor from a previous response's pagination.nextCursor. Do not construct by hand."
        },
        "refresh": {
          "type": "boolean",
          "description": "Force a fresh fetch from the Admin API, bypassing the cache. Default: false."
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "limit",
        "type": "integer",
        "required": false,
        "description": "Max accounts per page (default 20).",
        "constraints": {
          "min": 1,
          "max": 200
        }
      },
      {
        "name": "cursor",
        "type": "string",
        "required": false,
        "description": "Opaque pagination cursor from a previous response's pagination.nextCursor. Do not construct by hand."
      },
      {
        "name": "refresh",
        "type": "boolean",
        "required": false,
        "description": "Force a fresh fetch from the Admin API, bypassing the cache. Default: false."
      },
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "List accounts & properties",
        "mcp_params": {
          "reason": "Discover which GA4 properties are available"
        },
        "cli_command": "hopkin ga4 -account-summaries",
        "natural_language": "List accounts & properties"
      },
      {
        "label": "Next page",
        "mcp_params": {
          "limit": 20,
          "cursor": "eyJvZmZzZXQiOjIwfQ==",
          "reason": "Fetch the next page of accounts"
        },
        "cli_command": "hopkin ga4 -account-summaries --limit 20 --cursor eyJvZmZzZXQiOjIwfQ==",
        "natural_language": "Next page"
      },
      {
        "label": "Force refresh",
        "mcp_params": {
          "refresh": true,
          "reason": "Need the latest account/property list"
        },
        "cli_command": "hopkin ga4 -account-summaries --refresh true",
        "natural_language": "Force refresh"
      }
    ],
    "response_format": "markdown",
    "related_tools": [],
    "tool_type": "standard"
  },
  {
    "name": "ga4_check_auth_status",
    "title": "Check GA4 Auth Status",
    "description": "Troubleshoot authentication issues. Only use this when another tool fails with a permission or auth error — do NOT call proactively.\n\nReturns: authenticated status, user_id, email, and a human-readable message.",
    "cli_command": "hopkin ga4 k-auth-status",
    "cli_flags": [],
    "category": "k-auth-status",
    "annotations": {
      "readOnly": true,
      "destructive": false,
      "idempotent": true,
      "openWorld": false
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "Check auth",
        "mcp_params": {
          "reason": "Another tool returned an auth error, checking connection status"
        },
        "cli_command": "hopkin ga4 k-auth-status",
        "natural_language": "Check auth"
      }
    ],
    "response_format": "markdown",
    "related_tools": [
      {
        "name": "mailchimp_check_auth_status",
        "relationship": "cross-platform"
      }
    ],
    "tool_type": "standard"
  },
  {
    "name": "ga4_list_connections",
    "title": "List Google Analytics Connections",
    "description": "List the Google Analytics connections available to you — both ones you own and ones shared with you via an organization. Only Google connections with Google Analytics (analytics.readonly) scope are returned. Use this to discover connection IDs for set_default / share / rename / revoke.",
    "cli_command": "hopkin ga4 -connections",
    "cli_flags": [],
    "category": "-connections",
    "annotations": {
      "readOnly": true,
      "destructive": false,
      "idempotent": true,
      "openWorld": false
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "List connections",
        "mcp_params": {
          "reason": "User asked which Google Analytics accounts they have connected"
        },
        "cli_command": "hopkin ga4 -connections",
        "natural_language": "List connections"
      }
    ],
    "response_format": "markdown",
    "related_tools": [
      {
        "name": "mailchimp_list_connections",
        "relationship": "cross-platform"
      }
    ],
    "tool_type": "standard"
  },
  {
    "name": "ga4_set_default_connection",
    "title": "Set Default Google Analytics Connection",
    "description": "Set the Google Analytics connection that should be used by default for subsequent GA4 tool calls. The default is scoped to the calling actor (your user account, or the API key being used).",
    "cli_command": "hopkin ga4 default-connection",
    "cli_flags": [
      {
        "flag": "--connection-id",
        "description": "UUID of the connection to mark as the actor's default Google Analytics connection.",
        "type": "string",
        "required": true
      }
    ],
    "category": "default-connection",
    "annotations": {
      "readOnly": true,
      "destructive": false,
      "idempotent": true,
      "openWorld": false
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "connection_id": {
          "type": "string",
          "format": "uuid",
          "description": "UUID of the connection to mark as the actor's default Google Analytics connection."
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "connection_id",
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "connection_id",
        "type": "string",
        "required": true,
        "description": "UUID of the connection to mark as the actor's default Google Analytics connection."
      },
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "Set default",
        "mcp_params": {
          "connection_id": "00000000-0000-0000-0000-000000000001",
          "reason": "User picked their primary Google Analytics workspace"
        },
        "cli_command": "hopkin ga4 default-connection --connection-id 00000000-0000-0000-0000-000000000001",
        "natural_language": "Set default"
      }
    ],
    "response_format": "markdown",
    "related_tools": [
      {
        "name": "mailchimp_set_default_connection",
        "relationship": "cross-platform"
      }
    ],
    "tool_type": "standard"
  },
  {
    "name": "ga4_share_connection",
    "title": "Share Google Analytics Connection With Organization",
    "description": "Share an owned Google Analytics connection with all members of your organization, so teammates can use it without having to reconnect Google themselves. You must be the owner of the connection.",
    "cli_command": "hopkin ga4 e-connection",
    "cli_flags": [
      {
        "flag": "--connection-id",
        "description": "UUID of the connection to mark as the actor's default Google Analytics connection.",
        "type": "string",
        "required": true
      }
    ],
    "category": "e-connection",
    "annotations": {
      "readOnly": false,
      "destructive": false,
      "idempotent": true,
      "openWorld": false
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "connection_id": {
          "type": "string",
          "format": "uuid",
          "description": "UUID of the connection to mark as the actor's default Google Analytics connection."
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "connection_id",
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "connection_id",
        "type": "string",
        "required": true,
        "description": "UUID of the connection to mark as the actor's default Google Analytics connection."
      },
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "Share with org",
        "mcp_params": {
          "connection_id": "00000000-0000-0000-0000-000000000001",
          "reason": "User asked to share this Google Analytics connection with their teammates"
        },
        "cli_command": "hopkin ga4 e-connection --connection-id 00000000-0000-0000-0000-000000000001",
        "natural_language": "Share with org"
      }
    ],
    "response_format": "markdown",
    "related_tools": [
      {
        "name": "mailchimp_share_connection",
        "relationship": "cross-platform"
      }
    ],
    "tool_type": "standard"
  },
  {
    "name": "ga4_unshare_connection",
    "title": "Unshare Google Analytics Connection From Organization",
    "description": "Stop sharing an owned Google Analytics connection with your organization. Teammates lose access immediately. You must be the owner.",
    "cli_command": "hopkin ga4 are-connection",
    "cli_flags": [
      {
        "flag": "--connection-id",
        "description": "UUID of the connection to mark as the actor's default Google Analytics connection.",
        "type": "string",
        "required": true
      }
    ],
    "category": "are-connection",
    "annotations": {
      "readOnly": false,
      "destructive": true,
      "idempotent": true,
      "openWorld": false
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "connection_id": {
          "type": "string",
          "format": "uuid",
          "description": "UUID of the connection to mark as the actor's default Google Analytics connection."
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "connection_id",
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "connection_id",
        "type": "string",
        "required": true,
        "description": "UUID of the connection to mark as the actor's default Google Analytics connection."
      },
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "Stop sharing",
        "mcp_params": {
          "connection_id": "00000000-0000-0000-0000-000000000001",
          "reason": "User no longer wants the team to access this Google Analytics connection"
        },
        "cli_command": "hopkin ga4 are-connection --connection-id 00000000-0000-0000-0000-000000000001",
        "natural_language": "Stop sharing"
      }
    ],
    "response_format": "markdown",
    "related_tools": [
      {
        "name": "mailchimp_unshare_connection",
        "relationship": "cross-platform"
      }
    ],
    "tool_type": "standard"
  },
  {
    "name": "ga4_rename_connection",
    "title": "Rename Google Analytics Connection",
    "description": "Rename the display name of an owned Google Analytics connection. The OAuth grant and underlying account are unaffected — this only changes the human-readable label. You must be the owner.",
    "cli_command": "hopkin ga4 me-connection",
    "cli_flags": [
      {
        "flag": "--connection-id",
        "description": "UUID of the connection to mark as the actor's default Google Analytics connection.",
        "type": "string",
        "required": true
      }
    ],
    "category": "me-connection",
    "annotations": {
      "readOnly": false,
      "destructive": false,
      "idempotent": true,
      "openWorld": false
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "connection_id": {
          "type": "string",
          "format": "uuid",
          "description": "UUID of the connection to mark as the actor's default Google Analytics connection."
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "connection_id",
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "connection_id",
        "type": "string",
        "required": true,
        "description": "UUID of the connection to mark as the actor's default Google Analytics connection."
      },
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "Rename",
        "mcp_params": {
          "connection_id": "00000000-0000-0000-0000-000000000001",
          "display_name": "Acme — Production",
          "reason": "User wanted a clearer label for this Google Analytics connection"
        },
        "cli_command": "hopkin ga4 me-connection --connection-id 00000000-0000-0000-0000-000000000001 --display-name Acme — Production",
        "natural_language": "Rename"
      }
    ],
    "response_format": "markdown",
    "related_tools": [
      {
        "name": "mailchimp_rename_connection",
        "relationship": "cross-platform"
      }
    ],
    "tool_type": "standard"
  },
  {
    "name": "ga4_revoke_connection",
    "title": "Revoke Google Analytics Connection",
    "description": "Revoke (soft-delete) an owned Google Analytics connection. Any defaults pointing to it are invalidated and shared org members lose access. The OAuth grant at Google is NOT revoked by this tool — the user must disconnect via the dashboard if they want to fully revoke at Google. You must be the owner.",
    "cli_command": "hopkin ga4 ke-connection",
    "cli_flags": [
      {
        "flag": "--connection-id",
        "description": "UUID of the connection to mark as the actor's default Google Analytics connection.",
        "type": "string",
        "required": true
      }
    ],
    "category": "ke-connection",
    "annotations": {
      "readOnly": false,
      "destructive": true,
      "idempotent": true,
      "openWorld": false
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "connection_id": {
          "type": "string",
          "format": "uuid",
          "description": "UUID of the connection to mark as the actor's default Google Analytics connection."
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "connection_id",
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "connection_id",
        "type": "string",
        "required": true,
        "description": "UUID of the connection to mark as the actor's default Google Analytics connection."
      },
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "Revoke",
        "mcp_params": {
          "connection_id": "00000000-0000-0000-0000-000000000001",
          "reason": "User asked to disconnect this Google Analytics account"
        },
        "cli_command": "hopkin ga4 ke-connection --connection-id 00000000-0000-0000-0000-000000000001",
        "natural_language": "Revoke"
      }
    ],
    "response_format": "markdown",
    "related_tools": [
      {
        "name": "mailchimp_revoke_connection",
        "relationship": "cross-platform"
      }
    ],
    "tool_type": "standard"
  },
  {
    "name": "ga4_developer_feedback",
    "title": "Submit Developer Feedback",
    "description": "Submit feedback about missing tools, improvements, bugs, or workflow gaps in the GA4 MCP toolset. Not for user-facing issues (auth errors, API errors).\n\nArgs:\n  feedback_type: new_tool, improvement, bug, workflow_gap\n  title: Short description (5-200 chars)\n  description: What is needed and why (20-2000 chars)\n  current_workaround (optional): How you're working around the gap\n  priority (optional): low, medium (default), high\n\nReturns: confirmation that feedback was recorded.",
    "cli_command": "hopkin ga4 loper-feedback",
    "cli_flags": [
      {
        "flag": "--feedback-type",
        "description": "Feedback category: new_tool (request new capability), improvement (enhance existing tool), bug (report issue), workflow_gap (missing workflow)",
        "type": "string",
        "required": true
      },
      {
        "flag": "--title",
        "description": "Concise title summarizing the feedback",
        "type": "string",
        "required": true
      },
      {
        "flag": "--description",
        "description": "What is needed and why",
        "type": "string",
        "required": true
      },
      {
        "flag": "--current-workaround",
        "description": "Current workaround, if any",
        "type": "string",
        "required": false
      },
      {
        "flag": "--priority",
        "description": "Impact level: low (nice-to-have), medium (improves workflow), high (blocking issue)",
        "type": "string",
        "required": false
      },
      {
        "flag": "--interface",
        "description": "Interface the feedback originated from: MCP (default) or CLI",
        "type": "string",
        "required": false
      }
    ],
    "category": "loper-feedback",
    "annotations": {
      "readOnly": false,
      "destructive": false,
      "idempotent": true,
      "openWorld": true
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "feedback_type": {
          "type": "string",
          "enum": [
            "new_tool",
            "improvement",
            "bug",
            "workflow_gap"
          ],
          "description": "Feedback category: new_tool (request new capability), improvement (enhance existing tool), bug (report issue), workflow_gap (missing workflow)"
        },
        "title": {
          "type": "string",
          "minLength": 5,
          "maxLength": 200,
          "description": "Concise title summarizing the feedback"
        },
        "description": {
          "type": "string",
          "minLength": 20,
          "maxLength": 2000,
          "description": "What is needed and why"
        },
        "current_workaround": {
          "type": "string",
          "maxLength": 1000,
          "description": "Current workaround, if any"
        },
        "priority": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high"
          ],
          "default": "medium",
          "description": "Impact level: low (nice-to-have), medium (improves workflow), high (blocking issue)"
        },
        "interface": {
          "type": "string",
          "enum": [
            "MCP",
            "CLI"
          ],
          "default": "MCP",
          "description": "Interface the feedback originated from: MCP (default) or CLI"
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "feedback_type",
        "title",
        "description",
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "feedback_type",
        "type": "string",
        "required": true,
        "description": "Feedback category: new_tool (request new capability), improvement (enhance existing tool), bug (report issue), workflow_gap (missing workflow)",
        "enum_values": [
          "new_tool",
          "improvement",
          "bug",
          "workflow_gap"
        ]
      },
      {
        "name": "title",
        "type": "string",
        "required": true,
        "description": "Concise title summarizing the feedback",
        "constraints": {
          "min_length": 5,
          "max_length": 200
        }
      },
      {
        "name": "description",
        "type": "string",
        "required": true,
        "description": "What is needed and why",
        "constraints": {
          "min_length": 20,
          "max_length": 2000
        }
      },
      {
        "name": "current_workaround",
        "type": "string",
        "required": false,
        "description": "Current workaround, if any",
        "constraints": {
          "max_length": 1000
        }
      },
      {
        "name": "priority",
        "type": "string",
        "required": false,
        "description": "Impact level: low (nice-to-have), medium (improves workflow), high (blocking issue)",
        "enum_values": [
          "low",
          "medium",
          "high"
        ],
        "default": "medium"
      },
      {
        "name": "interface",
        "type": "string",
        "required": false,
        "description": "Interface the feedback originated from: MCP (default) or CLI",
        "enum_values": [
          "MCP",
          "CLI"
        ],
        "default": "MCP"
      },
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "Missing tool",
        "mcp_params": {
          "feedback_type": "new_tool",
          "title": "Audience export",
          "description": "Need ability to list GA4 audiences and their definitions",
          "priority": "medium",
          "reason": "User asked to audit audience setup"
        },
        "cli_command": "hopkin ga4 loper-feedback --feedback-type new_tool --title Audience export --description Need ability to list GA4 audiences and their definitions --priority medium",
        "natural_language": "Missing tool"
      },
      {
        "label": "Workflow gap",
        "mcp_params": {
          "feedback_type": "workflow_gap",
          "title": "Multi-property reports",
          "description": "Cannot run one report across several GA4 properties at once",
          "current_workaround": "Call ga4_run_report per property and merge results",
          "reason": "User manages 12 properties"
        },
        "cli_command": "hopkin ga4 loper-feedback --feedback-type workflow_gap --title Multi-property reports --description Cannot run one report across several GA4 properties at once --current-workaround Call ga4_run_report per property and merge results",
        "natural_language": "Workflow gap"
      }
    ],
    "response_format": "markdown",
    "related_tools": [
      {
        "name": "mailchimp_developer_feedback",
        "relationship": "cross-platform"
      }
    ],
    "tool_type": "standard"
  },
  {
    "name": "ga4_get_metadata",
    "title": "Get GA4 Dimensions & Metrics",
    "description": "List the dimensions and metrics available on a GA4 property (including custom definitions), so ga4_run_report calls use valid API names instead of guessing.\n\nArgs:\n  property_id (string, required): GA4 property ID (numeric) or full resource name.\n  search (string, optional): Case-insensitive substring filter on API name / UI name (e.g. 'channel', 'revenue'). Omit to list everything.\n\nReturns:\n  dimension_count, metric_count, and matching dimensions/metrics with api_name, ui_name, category, type (metrics), and custom flag.",
    "cli_command": "hopkin ga4 metadata",
    "cli_flags": [
      {
        "flag": "--property-id",
        "description": "GA4 property ID (numeric) or full resource name.",
        "type": "string",
        "required": true
      },
      {
        "flag": "--search",
        "description": "Case-insensitive substring filter on API name / UI name (e.g. 'channel', 'revenue'). Omit to list everything.",
        "type": "string",
        "required": false
      }
    ],
    "category": "metadata",
    "annotations": {
      "readOnly": true,
      "destructive": false,
      "idempotent": false,
      "openWorld": true
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "property_id": {
          "type": "string",
          "minLength": 1,
          "description": "GA4 property ID (numeric) or full resource name."
        },
        "search": {
          "type": "string",
          "description": "Case-insensitive substring filter on API name / UI name (e.g. 'channel', 'revenue'). Omit to list everything."
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "property_id",
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "property_id",
        "type": "string",
        "required": true,
        "description": "GA4 property ID (numeric) or full resource name.",
        "constraints": {
          "min_length": 1
        }
      },
      {
        "name": "search",
        "type": "string",
        "required": false,
        "description": "Case-insensitive substring filter on API name / UI name (e.g. 'channel', 'revenue'). Omit to list everything."
      },
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "Search revenue metrics",
        "mcp_params": {
          "property_id": "123456789",
          "search": "revenue",
          "reason": "Find valid revenue metric API names"
        },
        "cli_command": "hopkin ga4 metadata --property-id 123456789 --search revenue",
        "natural_language": "Search revenue metrics"
      },
      {
        "label": "List everything",
        "mcp_params": {
          "property_id": "123456789",
          "reason": "Full dimension/metric inventory including custom definitions"
        },
        "cli_command": "hopkin ga4 metadata --property-id 123456789",
        "natural_language": "List everything"
      }
    ],
    "response_format": "markdown",
    "related_tools": [],
    "tool_type": "standard"
  },
  {
    "name": "ga4_ping",
    "title": "Ping GA4 MCP Server",
    "description": "Health check. Returns server status, version, and timestamp.",
    "cli_command": "hopkin ga4 ",
    "cli_flags": [
      {
        "flag": "--message",
        "description": "Optional message to echo back",
        "type": "string",
        "required": false
      }
    ],
    "category": "",
    "annotations": {
      "readOnly": true,
      "destructive": false,
      "idempotent": true,
      "openWorld": false
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "maxLength": 100,
          "description": "Optional message to echo back"
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "message",
        "type": "string",
        "required": false,
        "description": "Optional message to echo back",
        "constraints": {
          "max_length": 100
        }
      },
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "Health check",
        "mcp_params": {
          "reason": "Verify server is running"
        },
        "cli_command": "hopkin ga4 ",
        "natural_language": "Health check"
      },
      {
        "label": "With message",
        "mcp_params": {
          "message": "hello",
          "reason": "Test connectivity"
        },
        "cli_command": "hopkin ga4  --message hello",
        "natural_language": "With message"
      }
    ],
    "response_format": "markdown",
    "related_tools": [
      {
        "name": "mailchimp_ping",
        "relationship": "cross-platform"
      }
    ],
    "tool_type": "standard"
  },
  {
    "name": "ga4_get_property_details",
    "title": "Get GA4 Property Details",
    "description": "Setup-health snapshot for one GA4 property: property info, data streams (with enhanced measurement settings for web streams), key events, Google Ads links, attribution settings, and data retention settings.\n\nSections that fail to load are returned with an error string instead of failing the whole call.\n\nArgs:\n  property_id (string, required): GA4 property ID (numeric, e.g. '123456789') or full resource name ('properties/123456789').\n\nReturns:\n  property, data_streams, key_events, google_ads_links, attribution_settings, data_retention_settings — each either the API payload or { error }.",
    "cli_command": "hopkin ga4 property-details",
    "cli_flags": [
      {
        "flag": "--property-id",
        "description": "GA4 property ID (numeric, e.g. '123456789') or full resource name ('properties/123456789').",
        "type": "string",
        "required": true
      }
    ],
    "category": "property-details",
    "annotations": {
      "readOnly": true,
      "destructive": false,
      "idempotent": false,
      "openWorld": true
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "property_id": {
          "type": "string",
          "minLength": 1,
          "description": "GA4 property ID (numeric, e.g. '123456789') or full resource name ('properties/123456789')."
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "property_id",
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "property_id",
        "type": "string",
        "required": true,
        "description": "GA4 property ID (numeric, e.g. '123456789') or full resource name ('properties/123456789').",
        "constraints": {
          "min_length": 1
        }
      },
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "Audit property setup",
        "mcp_params": {
          "property_id": "123456789",
          "reason": "Check tracking and attribution configuration"
        },
        "cli_command": "hopkin ga4 property-details --property-id 123456789",
        "natural_language": "Audit property setup"
      },
      {
        "label": "Full resource name",
        "mcp_params": {
          "property_id": "properties/123456789",
          "reason": "Verify key events on the property"
        },
        "cli_command": "hopkin ga4 property-details --property-id properties/123456789",
        "natural_language": "Full resource name"
      }
    ],
    "response_format": "markdown",
    "related_tools": [],
    "tool_type": "standard"
  },
  {
    "name": "ga4_run_report",
    "title": "Run GA4 Report",
    "description": "Run a GA4 report (Data API runReport): arbitrary dimensions × metrics over one or more date ranges, with an optional simple dimension filter and ordering.\n\nUse ga4_get_metadata first to look up valid dimension/metric API names.\n\nArgs:\n  property_id (string, required): GA4 property ID (numeric) or full resource name.\n  dimensions (string[], optional): Up to 9 dimension API names (e.g. sessionDefaultChannelGroup, date).\n  metrics (string[], required): 1-10 metric API names (e.g. sessions, totalUsers, keyEvents, purchaseRevenue).\n  date_ranges (array, required): 1-4 ranges of { start_date, end_date, name? }. Dates are YYYY-MM-DD or relative (30daysAgo, yesterday, today).\n  dimension_filter (object, optional): Single-field filter { field, values[], match_type?, case_sensitive?, negate? }.\n  order_by (object, optional): { type: 'metric'|'dimension', name, desc? }.\n  limit (number, optional): Max rows, default 100, max 10000.\n  offset (number, optional): Row offset for pagination.\n\nReturns:\n  row_count (total rows before pagination), returned_rows, and rows flattened as { dimension: value, metric: value } objects.\n  For a single date range: metric_totals ({ metric: total }). For multiple date ranges: metric_totals_by_range ({ \"date_range_0\": { metric: total }, ... }) keyed by the dateRange dimension value (or the range's name).",
    "cli_command": "hopkin ga4 report",
    "cli_flags": [
      {
        "flag": "--property-id",
        "description": "GA4 property ID (numeric) or full resource name.",
        "type": "string",
        "required": true
      },
      {
        "flag": "--dimensions",
        "description": "GA4 dimension API names, e.g. sessionDefaultChannelGroup, landingPagePlusQueryString, date. Use ga4_get_metadata for valid names.",
        "type": "array",
        "required": false
      },
      {
        "flag": "--metrics",
        "description": "GA4 metric API names, e.g. sessions, totalUsers, keyEvents, purchaseRevenue.",
        "type": "array",
        "required": true
      },
      {
        "flag": "--date-ranges",
        "description": "One to 4 date ranges.",
        "type": "array",
        "required": true
      },
      {
        "flag": "--dimension-filter",
        "description": "Simple single-field dimension filter.",
        "type": "object",
        "required": false
      },
      {
        "flag": "--order-by",
        "description": "",
        "type": "object",
        "required": false
      },
      {
        "flag": "--limit",
        "description": "Max rows (default 100). Range: 1-10000.",
        "type": "integer",
        "required": false
      },
      {
        "flag": "--offset",
        "description": "Row offset for pagination.",
        "type": "integer",
        "required": false
      }
    ],
    "category": "report",
    "annotations": {
      "readOnly": true,
      "destructive": false,
      "idempotent": false,
      "openWorld": true
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "property_id": {
          "type": "string",
          "minLength": 1,
          "description": "GA4 property ID (numeric) or full resource name."
        },
        "dimensions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 9,
          "description": "GA4 dimension API names, e.g. sessionDefaultChannelGroup, landingPagePlusQueryString, date. Use ga4_get_metadata for valid names."
        },
        "metrics": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "maxItems": 10,
          "description": "GA4 metric API names, e.g. sessions, totalUsers, keyEvents, purchaseRevenue."
        },
        "date_ranges": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "start_date": {
                "type": "string",
                "minLength": 1,
                "description": "YYYY-MM-DD or relative (e.g. 30daysAgo, yesterday)."
              },
              "end_date": {
                "type": "string",
                "minLength": 1,
                "description": "YYYY-MM-DD or relative (e.g. today, yesterday)."
              },
              "name": {
                "type": "string",
                "description": "Optional label; appears as dateRange dimension when multiple ranges are used."
              }
            },
            "required": [
              "start_date",
              "end_date"
            ],
            "additionalProperties": false
          },
          "minItems": 1,
          "maxItems": 4,
          "description": "One to 4 date ranges."
        },
        "dimension_filter": {
          "type": "object",
          "properties": {
            "field": {
              "type": "string",
              "minLength": 1,
              "description": "Dimension API name to filter on."
            },
            "values": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "description": "Values to match; multiple values become an in-list filter."
            },
            "match_type": {
              "type": "string",
              "enum": [
                "EXACT",
                "CONTAINS",
                "BEGINS_WITH",
                "ENDS_WITH",
                "FULL_REGEXP"
              ],
              "description": "String match type for single-value filters (default EXACT); ignored for multi-value in-list filters."
            },
            "case_sensitive": {
              "type": "boolean",
              "description": "Case-sensitive matching (GA4 default is case-insensitive)."
            },
            "negate": {
              "type": "boolean",
              "description": "Invert the filter."
            }
          },
          "required": [
            "field",
            "values"
          ],
          "additionalProperties": false,
          "description": "Simple single-field dimension filter."
        },
        "order_by": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "metric",
                "dimension"
              ]
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "description": "Metric or dimension API name to order by."
            },
            "desc": {
              "type": "boolean",
              "description": "Descending (default true for metrics, false for dimensions)."
            }
          },
          "required": [
            "type",
            "name"
          ],
          "additionalProperties": false
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000,
          "description": "Max rows (default 100). Range: 1-10000."
        },
        "offset": {
          "type": "integer",
          "minimum": 0,
          "description": "Row offset for pagination."
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "property_id",
        "metrics",
        "date_ranges",
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "property_id",
        "type": "string",
        "required": true,
        "description": "GA4 property ID (numeric) or full resource name.",
        "constraints": {
          "min_length": 1
        }
      },
      {
        "name": "dimensions",
        "type": "array",
        "required": false,
        "description": "GA4 dimension API names, e.g. sessionDefaultChannelGroup, landingPagePlusQueryString, date. Use ga4_get_metadata for valid names."
      },
      {
        "name": "metrics",
        "type": "array",
        "required": true,
        "description": "GA4 metric API names, e.g. sessions, totalUsers, keyEvents, purchaseRevenue."
      },
      {
        "name": "date_ranges",
        "type": "array",
        "required": true,
        "description": "One to 4 date ranges."
      },
      {
        "name": "dimension_filter",
        "type": "object",
        "required": false,
        "description": "Simple single-field dimension filter."
      },
      {
        "name": "order_by",
        "type": "object",
        "required": false,
        "description": ""
      },
      {
        "name": "limit",
        "type": "integer",
        "required": false,
        "description": "Max rows (default 100). Range: 1-10000.",
        "constraints": {
          "min": 1,
          "max": 10000
        }
      },
      {
        "name": "offset",
        "type": "integer",
        "required": false,
        "description": "Row offset for pagination.",
        "constraints": {
          "min": 0
        }
      },
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "Sessions by channel (30 days)",
        "mcp_params": {
          "property_id": "123456789",
          "dimensions": [
            "sessionDefaultChannelGroup"
          ],
          "metrics": [
            "sessions",
            "totalUsers",
            "keyEvents"
          ],
          "date_ranges": [
            {
              "start_date": "30daysAgo",
              "end_date": "yesterday"
            }
          ],
          "reason": "Channel mix overview for the last 30 days"
        },
        "cli_command": "hopkin ga4 report --property-id 123456789 --dimensions sessionDefaultChannelGroup --metrics sessions,totalUsers,keyEvents --date-ranges [object Object]",
        "natural_language": "Sessions by channel (30 days)"
      },
      {
        "label": "Landing page revenue, filtered",
        "mcp_params": {
          "property_id": "123456789",
          "dimensions": [
            "landingPagePlusQueryString"
          ],
          "metrics": [
            "sessions",
            "purchaseRevenue"
          ],
          "date_ranges": [
            {
              "start_date": "2024-01-01",
              "end_date": "2024-01-31"
            }
          ],
          "dimension_filter": {
            "field": "sessionDefaultChannelGroup",
            "values": [
              "Paid Search"
            ]
          },
          "order_by": {
            "type": "metric",
            "name": "purchaseRevenue"
          },
          "limit": 25,
          "reason": "Top paid-search landing pages by revenue"
        },
        "cli_command": "hopkin ga4 report --property-id 123456789 --dimensions landingPagePlusQueryString --metrics sessions,purchaseRevenue --date-ranges [object Object] --dimension-filter [object Object] --order-by [object Object] --limit 25",
        "natural_language": "Landing page revenue, filtered"
      }
    ],
    "response_format": "markdown",
    "related_tools": [],
    "tool_type": "standard"
  },
  {
    "name": "ga4_run_realtime_report",
    "title": "Run GA4 Realtime Report",
    "description": "Run a GA4 realtime report (last 30 minutes of events). Primary use: verifying tags and key events fire after a tracking change, without waiting for standard processing lag.\n\nArgs:\n  property_id (string, required): GA4 property ID (numeric) or full resource name.\n  dimensions (string[], optional): Up to 9 realtime dimension API names (e.g. eventName, unifiedScreenName, country, deviceCategory).\n  metrics (string[], required): 1-10 realtime metric API names (e.g. activeUsers, eventCount, keyEvents).\n  limit (number, optional): Max rows, default 50.\n\nReturns:\n  row_count and rows flattened as { dimension: value, metric: value } objects.",
    "cli_command": "hopkin ga4 realtime-report",
    "cli_flags": [
      {
        "flag": "--property-id",
        "description": "GA4 property ID (numeric) or full resource name.",
        "type": "string",
        "required": true
      },
      {
        "flag": "--dimensions",
        "description": "Realtime dimension API names, e.g. eventName, unifiedScreenName, country, deviceCategory.",
        "type": "array",
        "required": false
      },
      {
        "flag": "--metrics",
        "description": "Realtime metric API names, e.g. activeUsers, eventCount, keyEvents.",
        "type": "array",
        "required": true
      },
      {
        "flag": "--limit",
        "description": "Max rows (default 50).",
        "type": "integer",
        "required": false
      }
    ],
    "category": "realtime-report",
    "annotations": {
      "readOnly": true,
      "destructive": false,
      "idempotent": false,
      "openWorld": true
    },
    "inputSchema": {
      "type": "object",
      "properties": {
        "property_id": {
          "type": "string",
          "minLength": 1,
          "description": "GA4 property ID (numeric) or full resource name."
        },
        "dimensions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 9,
          "description": "Realtime dimension API names, e.g. eventName, unifiedScreenName, country, deviceCategory."
        },
        "metrics": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "maxItems": 10,
          "description": "Realtime metric API names, e.g. activeUsers, eventCount, keyEvents."
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000,
          "description": "Max rows (default 50)."
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "Why this tool call is needed"
        }
      },
      "required": [
        "property_id",
        "metrics",
        "reason"
      ],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    },
    "parameters": [
      {
        "name": "property_id",
        "type": "string",
        "required": true,
        "description": "GA4 property ID (numeric) or full resource name.",
        "constraints": {
          "min_length": 1
        }
      },
      {
        "name": "dimensions",
        "type": "array",
        "required": false,
        "description": "Realtime dimension API names, e.g. eventName, unifiedScreenName, country, deviceCategory."
      },
      {
        "name": "metrics",
        "type": "array",
        "required": true,
        "description": "Realtime metric API names, e.g. activeUsers, eventCount, keyEvents."
      },
      {
        "name": "limit",
        "type": "integer",
        "required": false,
        "description": "Max rows (default 50).",
        "constraints": {
          "min": 1,
          "max": 10000
        }
      },
      {
        "name": "reason",
        "type": "string",
        "required": true,
        "description": "Why this tool call is needed",
        "constraints": {
          "min_length": 1,
          "max_length": 500
        }
      }
    ],
    "examples": [
      {
        "label": "Verify events firing",
        "mcp_params": {
          "property_id": "123456789",
          "dimensions": [
            "eventName"
          ],
          "metrics": [
            "eventCount"
          ],
          "reason": "Confirm tags fire after a tracking change"
        },
        "cli_command": "hopkin ga4 realtime-report --property-id 123456789 --dimensions eventName --metrics eventCount",
        "natural_language": "Verify events firing"
      }
    ],
    "response_format": "markdown",
    "related_tools": [],
    "tool_type": "standard"
  }
]