You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(migration): harden cam-mcp reference for public use
Remove internal CAM REST paths, auth header enumeration, and
retry/timeout details from the MCP reference. Narrow the illustrative
tool schema to parameters agents need; auth is handled by the server.
Align the agent workflow with the registered MCP tool only
(fetch-cam-bpa-findings). Replace the list-projects step with explicit
user confirmation of project id or name, matching aemcs-migration-mcp.
Copy file name to clipboardExpand all lines: skills/aem/cloud-service/skills/migration/references/cam-mcp.md
+15-48Lines changed: 15 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,15 @@ Read this file when **fetching BPA targets via MCP** instead of a CSV or cached
4
4
5
5
## Happy path (what the user should see)
6
6
7
-
1. Agent calls **`list-projects`** and shows **name**,**id**, and **description**.
8
-
2.**You pick**a project (even if only one is listed — confirms the right CAM context).
9
-
3. Agent calls **`fetch-cam-bpa-findings`** with that project and the **one pattern** for this session (`scheduler`, `assetApi`, etc., or `all` then filtered).
7
+
1. Agent asks the user for their**CAM project name or ID**.
8
+
2.**You confirm**the project name or ID (the agent should not guess or infer it).
9
+
3. Agent calls **`fetch-cam-bpa-findings`** with the confirmed project and the **one pattern** for this session (`scheduler`, `assetApi`, etc., or `all` then filtered).
10
10
4. Agent maps returned targets to Java files and continues the migration workflow in `../SKILL.md`.
11
11
12
12
### Project name and ID — non-negotiable
13
13
14
-
-**Never** call **`fetch-cam-bpa-findings`** with a `projectId` or `projectName` that the user typed until it is **matched to a row** from the latest **`list-projects`** response, **or** the user has explicitly confirmed the intended project after you showed **name**, **id**, and **description** for all listed projects.
15
-
- If the user gave a name before you listed projects, still run **`list-projects`**, show the table, and **wait for them to confirm** which project (by id or unambiguous name) — do not assume a fuzzy match.
14
+
-**Never** call **`fetch-cam-bpa-findings`** with a `projectId` or `projectName` that the user has not **explicitly confirmed**.
15
+
- If the tool returns a "project not found" error, **quote the error verbatim**, and ask the user to provide the correct project name or ID — do not guess or retry with a fuzzy match.
16
16
-**Do not** infer the CAM project from the open workspace, repository name, or sample code (e.g. WKND) when using MCP.
17
17
18
18
### MCP errors — stop first (especially project-not-found)
@@ -21,7 +21,7 @@ On **any** MCP failure, **stop the migration workflow immediately**. **Quote the
21
21
22
22
**Exception:**[enablement restriction errors](#enablement-restriction-errors-mandatory-handling) below — follow that section exactly (verbatim to user; no retry; no silent fallback).
23
23
24
-
**After** that verbatim report, you may briefly explain what went wrong (e.g. unknown project name) and show **relevant rows from `list-projects`** if you already have them. **Only** if the user **explicitly** asks to switch approach (e.g. provides a BPA CSV path, picks another project from the list, or names specific Java files for manual flow) may you proceed — that is a **new** user-directed step, not an automatic fallback.
24
+
**After** that verbatim report, you may briefly explain what went wrong (e.g. unknown project name). **Only** if the user **explicitly** asks to switch approach (e.g. provides a BPA CSV path, picks another project, or names specific Java files for manual flow) may you proceed — that is a **new** user-directed step, not an automatic fallback.
25
25
26
26
For other failures (auth, timeout, 5xx), still quote errors verbatim; use retries only where the table below allows, then **stop** and ask how the user wants to continue (CSV, different project, or manual files) — do not silently pivot.
27
27
@@ -47,55 +47,22 @@ If your MCP server documentation adds other error prefixes or codes with the sam
47
47
48
48
## Rules before any tool call
49
49
50
-
1.Call **`list-projects`**first; show **name**, **id**, and **description** to the user.
51
-
2.**Wait for explicit project choice** (even if only one project), then call **`fetch-cam-bpa-findings`** using the **confirmed**`projectId` (preferred) or a name that the user affirmed against that list — do not pass an unconfirmed string the user guessed.
50
+
1.**Ask the user**for their CAM project name or ID. Do not guess from the workspace or sample code.
51
+
2.**Wait for explicit confirmation**, then call **`fetch-cam-bpa-findings`** using the **confirmed**`projectId` (preferred) or `projectName`.
52
52
3. Map the session's **single pattern** to the tool's `pattern` argument (`scheduler`, `assetApi`, `eventListener`, `resourceChangeListener`, `eventHandler`, or `all`). If you used `all`, filter `targets` to the active pattern.
53
53
54
-
## REST (maintainer context)
55
-
56
-
The MCP server calls **Adobe AEM Cloud Adoption Service**, for example:
57
-
58
-
-`GET {base}/projects` — projects for the authenticated IMS org.
59
-
-`GET {base}/projects/{projectId}/bpaReportCodeTransformerData/subtype/{subtype}` — aggregated identifiers per BPA subtype (e.g. `sling.commons.scheduler` for scheduler).
60
-
61
-
Auth headers typically include `Authorization: Bearer …`, `x-api-key`, and `x-gw-ims-org-id` (often `ident@AdobeOrg`). Subtype mapping is implemented in the MCP server.
62
-
63
-
**Deeper docs:**`aemcs-migration-mcp/docs/cam-cloud-adoption-api-contract.md`; controllers `ProjectController`, `BpaReportCodeTransformerDataController` in `aem-cloud-adoption-service`.
64
-
65
-
---
66
-
67
-
## Tool: `list-projects`
68
-
69
-
Lists CAM projects. **Always call this before `fetch-cam-bpa-findings`.**
70
-
71
-
**Response (illustrative):**
72
-
73
-
```typescript
74
-
{
75
-
success: true;
76
-
projects: Array<{
77
-
id:string;
78
-
name:string;
79
-
description:string;
80
-
}>;
81
-
}
82
-
```
83
-
84
-
---
85
-
86
54
## Tool: `fetch-cam-bpa-findings`
87
55
56
+
The only MCP tool registered by the server. It can also resolve a project name to a project ID internally (via the CAM projects API), so a separate `list-projects` call is not needed — pass `projectName` or `projectId`.
57
+
88
58
**Request (illustrative — confirm against live MCP tool schema):**
89
59
90
60
```typescript
91
61
{
92
-
projectId: string; //required after user confirms project (from list-projects)
93
-
projectName?:string; //only if user affirmed this name against list-projects; never pass an unconfirmed guess
62
+
projectId?:string; //CAM project ID; either this or projectName must be provided
63
+
projectName?:string; //human-readable name; resolved to projectId via CAM /projects API
environment?:"dev"|"stage"|"prod"; // defaults to "prod"
99
66
}
100
67
```
101
68
@@ -143,7 +110,7 @@ const result = await fetchCamBpaFindings({
143
110
144
111
## Retries and agent behavior
145
112
146
-
**MCP tool:**Often implements exponential backoff (e.g. up to 3 attempts, ~30s timeout, backoff 2s / 4s / 8s). **Confirm in server implementation** if behavior changes.
113
+
**MCP tool:**The server implements its own retry and timeout logic internally. Do not add agent-side retries on top unless the table below says otherwise.
147
114
148
115
**Agent:**
149
116
@@ -157,7 +124,7 @@ const result = await fetchCamBpaFindings({
157
124
|-----------|--------|--------|
158
125
| Error starts with `The MCP Server is restricted and isn't able to operate on the given`| No |[Verbatim to user](#enablement-restriction-errors-mandatory-handling); stop automatic fallback |
159
126
| Auth 401 / 403 | No | Quote error verbatim; stop. Ask how to proceed (credentials, CSV, or named files) only after stopping. |
160
-
| 404 / "no project found" / unknown `projectId`| No | Quote error verbatim; stop. Show `list-projects` results again if available; **require** user to confirm the correct project or another source (CSV / explicit file list). **No** automatic "local workspace" migration. |
127
+
| 404 / "no project found" / unknown `projectId`| No | Quote error verbatim; stop. **Require** user to confirm the correct project name/ID or choose another source (CSV / explicit file list). **No** automatic "local workspace" migration. |
161
128
| Network / timeout | Once | Retry after ~2s, then quote error verbatim and stop if still failing. |
162
129
| 5xx | Once | Retry after ~2s, then quote error verbatim and stop if still failing. |
163
130
| 400 | No | Quote error verbatim; stop; ask user to fix parameters or pick another path. |
0 commit comments