MCP Suggested Actions

Defines how the MCP server surfaces contextual next-step actions to the UI / MCP client after every tool invocation.

Suggested Action Schema

{
  "id": "push_ecosystem",
  "label": "Push changes",
  "tool": "amof_push_ecosystem",
  "args": { "ecosystem": "amof-platform" },
  "scope": "ecosystem",
  "mode_required": "execute",
  "safety": "dangerous-write",
  "confirm": true,
  "priority": 1,
  "description": "Push all committed changes to remote",
  "condition": "status.has_unpushed"
}
FieldTypeDescription
idstringStable identifier for deduplication and analytics
labelstringShort button/chip label (max 30 chars)
toolstringMCP tool name to invoke
argsobjectPre-filled arguments
scopeenumglobal, ecosystem, run, release, server
mode_requiredenumMinimum mode: ask, plan, execute
safetyenumread-only, safe-write, dangerous-write
confirmboolWhether UI must prompt before executing
priorityint1 = highest, 5 = lowest

Predefined Action Sets

Global Scope (Default)

PriorityLabelToolSafety
1List ecosystemsamof_list_ecosystemsread-only
2Server statusamof_get_server_statusread-only
3Show active runsamof_get_active_runsread-only
4View telemetryamof_get_global_telemetryread-only

Ecosystem -- After Sync

PriorityLabelToolSafety
1Check statusamof_get_ecosystem_statusread-only
2Push changesamof_push_ecosystemdangerous-write
3Show runsamof_get_active_runsread-only

Ecosystem -- Dirty Repos

PriorityLabelToolSafety
1Push changesamof_push_ecosystemdangerous-write
2Check statusamof_get_ecosystem_statusread-only
3Sync reposamof_sync_ecosystemsafe-write

Run -- Completed (Success)

PriorityLabelToolSafety
1View summaryamof_summarize_runread-only
2Show logsamof_get_run_logsread-only
3Back to ecosystemamof_get_ecosystem_statusread-only

Release -- Alpha

PriorityLabelToolSafety
1Promote to betaamof_release_promotedangerous-write
2Release statusamof_release_statusread-only
3Validate releaseamof_release_validateread-only

Rendering Protocol

Constraints

  • Maximum 5 actions per response
  • Priority ordering: lower number = more prominent position
  • Mode gating: filter out actions where mode_required > current_mode
  • Deduplication: same id can only appear once; keep highest priority
  • Scope gating: only suggest actions for current scope or its parent

Mode Filtering

Current ModeAllowed Safety Levels
askread-only only
planread-only, safe-write
executeread-only, safe-write, dangerous-write

Suppression Rules

  • Post-Read: Max 3 actions for info queries; no destructive actions unless status indicates need
  • Same-Action: Never suggest the tool just invoked (exception: refresh for running runs)
  • Scope Boundary: No ecosystem-scoped actions without entering an ecosystem
  • Post-Destructive: Only suggest amof_list_ecosystems after discard/destroy
  • Completion: After async action started, only suggest run_status and run_logs

State Machine

┌──────────────────────────────────────────────────────────────┐
│                         GLOBAL SCOPE                          │
│  Default: [List ecosystems] [Server status] [Active runs]    │
│                                                                │
│  ┌───────────────────────────────────────────────────────┐    │
│  │                    ECOSYSTEM SCOPE                     │    │
│  │  after_install:  [Status] [Sync] [Start ticket]       │    │
│  │  after_sync:     [Status] [Push] [Show runs]          │    │
│  │  dirty_repos:    [Push] [Status] [Sync]               │    │
│  │  no_ticket:      [Start ticket] [List tickets]        │    │
│  │                                                        │    │
│  │  ┌──────────────────────────────────────────────┐     │    │
│  │  │               RUN SCOPE                       │     │    │
│  │  │  running:  [Refresh] [Stream logs]            │     │    │
│  │  │  success:  [Summary] [Logs] [<- Ecosystem]    │     │    │
│  │  │  failed:   [Logs] [Summary] [<- Ecosystem]    │     │    │
│  │  └──────────────────────────────────────────────┘     │    │
│  │                                                        │    │
│  │  ┌──────────────────────────────────────────────┐     │    │
│  │  │            RELEASE SCOPE                      │     │    │
│  │  │  alpha:   [-> Beta] [Status] [Validate]       │     │    │
│  │  │  beta:    [-> RC] [Validate] [History]         │     │    │
│  │  │  rc:      [-> Stable] [Validate] [History]     │     │    │
│  │  │  stable:  [History] [Status]                   │     │    │
│  │  └──────────────────────────────────────────────┘     │    │
│  └───────────────────────────────────────────────────────┘    │
└──────────────────────────────────────────────────────────────┘