Amplitude(分析ツール)のグラフを、自然な日本語の説明文から自動で作成します。イベント(測定対象となるアクション)の選択、データの絞り込み、グループ分け、グラフの形式など、必要な設定をすべて処理します。 次のような場合に使用: 何を計測したいかは決まっているけれど、グラフを手作業で組み立てるのは避けたい場合。
Creates Amplitude charts from natural language descriptions, handling event selection, filters, groupings, and visualization choices. Use when you know what you want to measure but prefer not to build the chart manually.
自然言語からチャートを作成します。イベントの発見、チャート定義の構築、結果の検証を行います。
ツール呼び出しの前に、リクエストを分解してください:
1. チャートの構成要素を特定する:
2. イベント検索の計画:
3. 並列ツール呼び出しの計画:
重要:絞り込む前に広く網を張る
ユーザーのリクエストが曖昧、または複数のイベントに該当する可能性がある場合:
イベントを検索:
Amplitude:search entity_types=['EVENT', 'CUSTOM_EVENT']で実行
情報に基づいた判断を下す、その後説明する:
判断基準:
例:
使用前に検証:
プロパティ(属性情報)を取得:
Amplitude:get_propertiesで正確なプロパティ名/値を取得
コホートを検索:
Amplitude:search entity_types=['COHORT']で実行
Amplitude:get_cohortsで完全な定義を取得
| チャートタイプ | 次のような場合に使用 |
|---|---|
eventsSegmentation |
イベント/ユーザーを時系列でカウント、トレンド、比較、KPI(重要指標)、分布、プロパティ分析 |
funnels |
既知の順序を持つ複数ステップのコンバージョン分析、落ちこぼれ分析、特定イベント間の経過時間、コンバージョン時間指標 |
retention |
ユーザーの戻り傾向、コホート(ユーザーグループ)の維持率曲線、チャーン(離脱)分析 |
dataTableV2 |
表形式の比較、ランキング、多次元分類 |
customerJourney |
パス探索、ユーザーが実際に取る未知のパスの発見、コンバージョン達成ユーザーと落ちこぼれユーザーのパス比較 |
sessions |
セッション期間、セッション頻度、ユーザーあたりの時間費やし、セッション長分布 |
eventsSegmentation — 最も汎用性が高い。以下に使用:
uniques指標を使用したユーザー数(日次アクティブユーザー、週間アクティブユーザー、月間アクティブユーザー)集約スコープ(eventsSegmentation):
PROPSUM(A) / metric: "sums" = すべてのイベント全体の合計metric: "frequency" = ユーザーあたりのイベント数の分布(1回実行したユーザー数、2回、3回など)metric: "frequency"を使用するか、user_idでグループ化したdataTableV2をPROPSUMで使用してから外部分析用にエクスポートしてください。funnels — 事前に決められたステップでのコンバージョン分析。以下に使用:
customerJourneyを使用してくださいretention — 戻り傾向。以下に使用:
dataTableV2 — 表形式データ。以下に使用:
customerJourney — パス探索と発見。以下に使用:
sessions — セッションベースのエンゲージメント指標。以下に使用:
特殊指標:
metric: "uniques"metric: "totals"metric: "sums"(group_byにプロパティを指定)メタイベント:
_active:任意のアクティブイベント(日次アクティブユーザー、月間アクティブユーザー)_new:新規ユーザー(初回イベント)_any_revenue_event:売上イベント共通パラメーター(すべてのチャートタイプ):
{
"name": "説明的なチャートタイトル",
"projectId": "12345",
"definition": {
"app": "12345",
"type": "eventsSegmentation",
"params": {
"range": "Last 30 Days",
"events": [{
"event_type": "Purchase Completed",
"filters": [],
"group_by": []
}],
"metric": "uniques",
"countGroup": "User",
"interval": 1,
"segments": [{"conditions": []}]
}
}
}
主要パラメーター:
countGroup:「User」(ユニークユーザー)または「Event」(イベント発生数)interval:1(日次)、7(週次)、30(月次)segments:ユーザーフィルター/グループ(空配列 = すべてのユーザー)イベントフィルター(インラインOR論理):
"filters": [{
"group_type": "User",
"subprop_key": "country",
"subprop_op": "is",
"subprop_type": "event",
"subprop_value": ["United States", "Canada"]
}]
ここの
group_typeはカウント対象のエンティティ(「User」、またはグループタイプ)です — プロパティのスコープではありません。アカウントレベルのプロパティでフィルターするには、subprop_typeを「group」に設定し、group_typeをそのプロパティを所有するグループタイプに設定し、get_properties({propertyType: 'group', groupType: '<type>'})の正確な名前を使用してください。プロパティ名に「grp:」をプレフィックスとしないでください。レスポンスが「Invalid group property … for group type …」の場合、そのペアはこのプロジェクトでクエリできません — バリエーションを再試行しないでください。ユーザーレベルまたはイベントレベルの同等物を使用してください。
ユーザーセグメント(条件AND論理):
"segments": [{
"name": "Active Users",
"conditions": [{
"type": "property",
"group_type": "User",
"prop_type": "user",
"prop": "plan",
"op": "is",
"values": ["Pro", "Enterprise"]
}]
}]
コホートセグメント: コホートを検索してIDを取得してから:
"segments": [{
"name": "My Cohort",
"conditions": [{
"type": "cohort",
"group_type": "User",
"cohort_id": "abc123",
"op": "is_in"
}]
}]
Amplitude:get_amplitude_context(projectIdのため)
Amplitude:searchで各異なるコンセプトを検索
- 最初は
Create charts from natural language by discovering events, building chart definitions, and verifying results.
Before any tool calls, decompose the request:
1. Identify chart components:
2. Plan event searches:
3. Plan parallel tool calls:
IMPORTANT: Cast a wide net before narrowing down
When the user's request is ambiguous or could map to multiple events:
Search for events:
Amplitude:search with entity_types=['EVENT', 'CUSTOM_EVENT']
Make informed decisions, then explain:
Decision criteria:
Examples:
Verify before use:
Get properties:
Amplitude:get_properties for exact property names/values
Find cohorts:
Amplitude:search with entity_types=['COHORT']
Amplitude:get_cohorts to get full definitions
| Chart Type | Use When |
|---|---|
eventsSegmentation |
Counting events/users over time, trends, comparisons, KPIs, distributions, property analytics |
funnels |
Multi-step conversion analysis with a known sequence, drop-off analysis, time between specific events, time-to-convert metrics |
retention |
User return behavior, cohort retention curves, churn analysis |
dataTableV2 |
Tabular comparisons, rankings, multi-dimensional breakdowns |
customerJourney |
Path exploration, discovering unknown paths users take, comparing converted vs dropped-off paths |
sessions |
Session duration, session frequency, time spent per user, session length distributions |
eventsSegmentation - Most versatile. Use for:
uniques metricAggregation Scope (eventsSegmentation):
PROPSUM(A) / metric: "sums" = Global sum across ALL eventsmetric: "frequency" = Distribution of per-user event counts (how many users did it 1x, 2x, 3x)metric: "frequency" for event count distributions, or use dataTableV2 grouped by user_id with PROPSUM, then export for external analysis.funnels - Conversion analysis with predefined steps. Use for:
customerJourney insteadretention - Return behavior. Use for:
dataTableV2 - Tabular data. Use for:
customerJourney - Path exploration and discovery. Use for:
sessions - Session-based engagement metrics. Use for:
Special metrics:
metric: "uniques"metric: "totals"metric: "sums" with property in group_byMeta events:
_active: Any active event (DAU, MAU)_new: New users (first-time event)_any_revenue_event: Revenue eventsCore parameters (all chart types):
{
"name": "Descriptive Chart Title",
"projectId": "12345",
"definition": {
"app": "12345",
"type": "eventsSegmentation",
"params": {
"range": "Last 30 Days",
"events": [{
"event_type": "Purchase Completed",
"filters": [],
"group_by": []
}],
"metric": "uniques",
"countGroup": "User",
"interval": 1,
"segments": [{"conditions": []}]
}
}
}
Key parameters:
countGroup: "User" (unique users) or "Event" (event occurrences)interval: 1 (daily), 7 (weekly), 30 (monthly)segments: User filters/groups (empty array = all users)Event filters (inline OR logic):
"filters": [{
"group_type": "User",
"subprop_key": "country",
"subprop_op": "is",
"subprop_type": "event",
"subprop_value": ["United States", "Canada"]
}]
group_typehere is the counting entity ("User", or a group like "org id") — not the scope of the property. To filter on an account-level property, setsubprop_typeto"group"andgroup_typeto the group type that owns it, using the exact name fromget_properties({propertyType: 'group', groupType: '<type>'}). Never prefix the property name withgrp:. If the response isInvalid group property … for group type …, that pair is not queryable in this project — do not retry variants; use a user- or event-level equivalent.
User segments (conditions AND logic):
"segments": [{
"name": "Active Users",
"conditions": [{
"type": "property",
"group_type": "User",
"prop_type": "user",
"prop": "plan",
"op": "is",
"values": ["Pro", "Enterprise"]
}]
}]
Cohort segments: Search for cohort, get ID, then:
"segments": [{
"name": "My Cohort",
"conditions": [{
"type": "cohort",
"group_type": "User",
"cohort_id": "abc123",
"op": "is_in"
}]
}]
Amplitude:get_amplitude_context (for projectId)
Amplitude:search for each distinct concept
- Use broad search terms initially
- Look for all related events, custom events, cohorts
- Review ALL results before selecting
Amplitude:search entity_types=['CHART'] query="similar concept"
Amplitude:get_charts to see definition structure
Amplitude:get_properties
Amplitude:query_dataset with full definition
Verify results - check data makes sense
Save chart:
Amplitude:save_chart_edits with editId from query_dataset
If query_dataset fails:
If zero results:
Naming:
Time ranges:
Verification:
Comparisons:
Always include:
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。