> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Build with Arch using MCP

Agent Platform exposes its features through a Model Context Protocol (MCP) server. Your AI assistant can connect to the platform and perform platform operations to let you build, evaluate, optimize, debug, and analyze agents.

A few common tasks include:

* Creating and editing projects, agents, and tools
* Running evaluations
* Inspecting live sessions and traces
* Diagnosing failures

You can perform all these operations from the platform UI as well. However, by using MCP server, you can perform these tasks from within your IDE, command-line, or terminal, without context-switching.

The server's name as available in the clients is `arch-agent-platform` and its tools are prefixed with `platform_` and `debug_`. These tools are grouped by functional area.

## Build

Create and change platform projects, workflows, agents, tools, auth profiles, integrations, MCP servers, configuration, versions, deployments, and imports.

| Tool                                  | Description                                                                      |
| :------------------------------------ | :------------------------------------------------------------------------------- |
| `platform_projects`                   | Manage projects (list, get, create, update, delete)                              |
| `platform_workflows`                  | Create, update, publish, execute, and expose workflows as tools                  |
| `platform_auth_profiles`              | Manage profile metadata and start secure OAuth flows                             |
| `platform_integrations`               | Create, update, test, and remove connector connections                           |
| `platform_mcp_servers`                | Provision MCP servers; discover, import, and test tools                          |
| `platform_agents`                     | Manage agents (list, get, save\_dsl)                                             |
| `platform_versions`                   | Manage immutable versions (list, get, publish, qualifications, audit, diff)      |
| `platform_deployments`                | Manage typed deployments (list, get, create, promote, rollback, restore, retire) |
| `platform_sdk_channels`               | Create SDK keys and web, mobile, and API channels                                |
| `platform_tools`                      | Manage tools (list, get, create, update, delete, test)                           |
| `platform_import_export`              | Import and export projects                                                       |
| `platform_config`                     | Manage project and LLM configuration                                             |
| `platform_workspaces`                 | List, switch, and inspect active workspaces                                      |
| `platform_arch_sop`                   | Drive Studio Arch SOP-build sessions                                             |
| `platform_arch_auto_loop`             | Drive project-scoped Arch Auto Loop repair workflows                             |
| `platform_project_builder`            | Discover provider contracts, inspect live dependencies and readiness, and plan   |
| `platform_project_builder_operations` | Continue durable operations and execute attempt-bound governed actions           |
| `agent_tables`                        | Manage Agent Tables definitions and project-scoped rows                          |

### Project-builder protocol

`platform_project_builder` and `platform_project_builder_operations` expose a feature-neutral protocol rather than one tool per feature. Call `platform_project_builder(action: "describe")` to discover the core ontology and registered providers instead of reconstructing cross-feature dependencies by calling primitive tools and joining the responses yourself.
The server's name as available in the clients is `arch-agent-platform` and its tools are prefixed with `platform_` and `debug_`. These tools are grouped by functional area.

## Build

Use `platform_project_builder_operations` for durable list, read, report, resume, cancel, grant, and execute flows. Side effects require the exact operation version and attempt-bound grant that Studio returns. Never retry a consumed attempt with an unknown outcome.

`platform_auth_profiles(create)` only creates profiles with `authType: "none"`. Credential-bearing profiles return a `secureSetupRequired` handoff instead, because API keys, client secrets, certificates, and tokens must never enter MCP or model context. After you complete setup in Studio, MCP can list, inspect, update metadata for, validate, revoke, and initiate OAuth for a profile, then bind its opaque profile ID to integrations or MCP servers.

## Evaluate

Generate eval assets, run eval workflows, and read CI evidence.

| Tool                       | Description                                      |
| :------------------------- | :----------------------------------------------- |
| `platform_eval_personas`   | Manage and generate eval personas                |
| `platform_eval_scenarios`  | Manage and generate eval scenarios               |
| `platform_eval_evaluators` | Manage eval evaluators and templates             |
| `platform_eval_sets`       | Manage eval sets                                 |
| `platform_eval_runs`       | Manage eval runs, preflight, cases, and heatmaps |
| `debug_harness_logs`       | Get CI execution logs                            |

## Optimize

Validate packages, inspect compiler-visible models, and drive repair loops.

| Tool                          | Description                                                             |
| :---------------------------- | :---------------------------------------------------------------------- |
| `platform_validate_package`   | Validate a local package and optional import preview                    |
| `platform_package_model`      | Show compiler-visible agents, tools, constraints, refs, and diagnostics |
| `debug_lint_abl`              | Run ABL repair and design lint checks                                   |
| `debug_why_transcript_failed` | Correlate transcript symptoms with ABL file/line causes                 |
| `debug_diagnose_transcript`   | Alias for transcript failure diagnosis                                  |

## Debug

Connect to live sessions, trace failures, and inspect execution state.

| Tool                         | Description                                        |
| :--------------------------- | :------------------------------------------------- |
| `platform_connect`           | Connect and authenticate to the platform           |
| `debug_list_agents`          | List available agents by domain                    |
| `debug_load_agent`           | Load an agent and create a debug session           |
| `debug_send_message`         | Send a message to an agent                         |
| `debug_get_current_state`    | Inspect agent context, gather progress, flow state |
| `debug_traces`               | Search trace events (type, text, agent, error)     |
| `debug_session_history`      | Page durable Runtime sessions and persisted traces |
| `debug_get_span_tree`        | View hierarchical execution flow                   |
| `debug_explain_decision`     | Explain agent decisions with context               |
| `debug_get_flow_graph`       | View state machine graph (JSON or Mermaid)         |
| `debug_get_errors`           | Get errors, warnings, and escalations              |
| `debug_list_active_sessions` | List observable sessions                           |
| `debug_session`              | Subscribe/unsubscribe to session traces            |

### Historical session analysis

Use `debug_session_history` as the read-only alternative to `debug_traces` when you need to analyze a retained session after its live MCP buffer is no longer available. Connect to the intended Runtime with `platform_connect` first, so the existing bearer identity, workspace, and environment stay authoritative.

List a first page (defaults: `limit: 50`, `offset: 0`, `sortBy: lastActivityAt`, `sortDir: desc`):

```json theme={null}
{ "action": "list", "projectId": "project-id", "status": ["completed"], "range": "7d" }
```

Read a middle or final trace page by advancing `offset`. A page beyond the final one returns an empty successful page, not an error:

```json theme={null}
{
  "action": "get",
  "projectId": "project-id",
  "sessionId": "session-id",
  "limit": 200,
  "offset": 200,
  "types": ["llm_call", "tool_call"]
}
```

Runtime controls retention, authorization, and ordering. Each call makes one bounded request (2 MiB, 10 seconds) and never falls back to the live MCP buffer. Don't place credentials or secrets in filter values.

## Analyze

Explain documentation, diagnostics, and system health signals.

| Tool                    | Description                                |
| :---------------------- | :----------------------------------------- |
| `debug_docs`            | Get or search ABL documentation            |
| `debug_diagnose`        | Diagnose agent config and execution issues |
| `debug_analyze_session` | Automated session diagnostics              |
