From 5f4f19b25e6ac419e2878c4a4dd5ab2aa45fc9b2 Mon Sep 17 00:00:00 2001 From: Kenneth Ng Date: Fri, 27 Nov 2026 16:24:09 +0000 Subject: [PATCH 1/5] fix: read accounts with stackone_get_accounts in the connection skill The skill named stackone_list_linked_accounts and stackone_get_account, which the management MCP does not have. Reconnect now reads connector_profile_id from the account instead of matching the profile by name. Co-Authored-By: Claude Opus 5.5 --- skills/stackone-connection/SKILL.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/skills/stackone-connection/SKILL.md b/skills/stackone-connection/SKILL.md index 940f5a5..dc5056f 100644 --- a/skills/stackone-connection/SKILL.md +++ b/skills/stackone-connection/SKILL.md @@ -17,7 +17,8 @@ If this session has no connector-profile or account-linking tools (such as `stac Find the thing before you touch it, and stop if it is already right. - A profile: `stackone_get_connector_profiles {connector_key: [""]}`, or `stackone_get_connector_profiles {id}` for one profile. `connector_key` is a list. -- An account: `stackone_list_linked_accounts {providers}` or `stackone_get_account {id}`. +- An account: `stackone_get_accounts {connector_key: [""], expand: "connector,connector_profile"}`, or + `stackone_get_accounts {id, expand: "connector,connector_profile"}` for one account. If the account is already linked and authenticated, or the profile already enables the action, say so and change nothing. @@ -47,7 +48,7 @@ user finishes in the browser. There is no status-poll tool. `{ auth_link_url, expires_at, provider, connector_profile_id, next_steps }`. Give the user the `auth_link_url` to open and relay `next_steps`. 2. When the user says they are done, confirm the account exists with a read: - `stackone_list_linked_accounts` or `stackone_get_account` returns the new account. Confirm + `stackone_get_accounts {connector_key: [""]}` returns the new account. Confirm success from that read, never from the fact that you started the link. ## Reconnect a broken account; do not replace it @@ -56,10 +57,8 @@ user finishes in the browser. There is no status-poll tool. edit-mode tool. You reconnect an expired or deauthorized account by starting a fresh link through the same connector profile the account already uses, then confirming by re-reading the account. -- Read the broken account with `stackone_get_account {id}`. Its output names the provider and the - profile (`integration_config_labels`), but not the profile id. -- Look the profile up with `stackone_get_connector_profiles {connector_key: [""]}` and match it by name to get its `id`. +- Read the broken account with `stackone_get_accounts {id, expand: "connector,connector_profile"}`. + Its `connector_profile_id` is the profile it links through. - Relink through that profile: ``` From 1723abbd253dc6f20f6731d2508cf17a28d74074 Mon Sep 17 00:00:00 2001 From: Kenneth Ng Date: Mon, 30 Nov 2026 13:07:16 +0000 Subject: [PATCH 2/5] feat: use an account repair tool for reconnection when the session has one The connection skill said no repair tool exists. A tool that reconnects an existing account by id is planned, so the skill now uses it when present and falls back to a fresh link through the account's own profile otherwise. Co-Authored-By: Claude Opus 5.5 --- skills/stackone-connection/SKILL.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/skills/stackone-connection/SKILL.md b/skills/stackone-connection/SKILL.md index dc5056f..931cbd4 100644 --- a/skills/stackone-connection/SKILL.md +++ b/skills/stackone-connection/SKILL.md @@ -53,13 +53,15 @@ user finishes in the browser. There is no status-poll tool. ## Reconnect a broken account; do not replace it -`stackone_link_account` has no `account_id` input, and this surface has no separate repair or -edit-mode tool. You reconnect an expired or deauthorized account by starting a fresh link through -the same connector profile the account already uses, then confirming by re-reading the account. +How you reconnect an expired or deauthorized account depends on the tools this session has. Either +way the result is the same account working again, never a second account for the same connection. - Read the broken account with `stackone_get_accounts {id, expand: "connector,connector_profile"}`. Its `connector_profile_id` is the profile it links through. -- Relink through that profile: +- If the session has a tool that reconnects or repairs an existing account by its id (for example + `stackone_relink_account`), use it on the broken account's `id`. +- Only when no such tool exists, start a fresh link through the profile the account already uses. + `stackone_link_account` has no `account_id` input, so the profile is what ties it to the account: ``` stackone_link_account { connector_profile_id: "" } From 7819fbff5e774deeab89eec4164fc107867bcb2e Mon Sep 17 00:00:00 2001 From: Kenneth Ng Date: Mon, 30 Nov 2026 14:19:09 +0000 Subject: [PATCH 3/5] fix: say that the stackone_link_account fallback adds a new account in the connection skill The real stackone_link_account always sends multiple: true, so a link through the broken account's profile creates a second account instead of repairing the first. Only a repair tool such as stackone_relink_account keeps the same account. Co-Authored-By: Claude Opus 5.5 --- skills/stackone-connection/SKILL.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/skills/stackone-connection/SKILL.md b/skills/stackone-connection/SKILL.md index 931cbd4..07c1083 100644 --- a/skills/stackone-connection/SKILL.md +++ b/skills/stackone-connection/SKILL.md @@ -53,23 +53,24 @@ user finishes in the browser. There is no status-poll tool. ## Reconnect a broken account; do not replace it -How you reconnect an expired or deauthorized account depends on the tools this session has. Either -way the result is the same account working again, never a second account for the same connection. +How you reconnect an expired or deauthorized account depends on the tools this session has. A +repair tool brings the same account back; a fresh link adds a new account beside the broken one. - Read the broken account with `stackone_get_accounts {id, expand: "connector,connector_profile"}`. Its `connector_profile_id` is the profile it links through. - If the session has a tool that reconnects or repairs an existing account by its id (for example `stackone_relink_account`), use it on the broken account's `id`. - Only when no such tool exists, start a fresh link through the profile the account already uses. - `stackone_link_account` has no `account_id` input, so the profile is what ties it to the account: + `stackone_link_account` has no `account_id` input, so it creates a new account through that + profile and leaves the broken one as it is: ``` stackone_link_account { connector_profile_id: "" } ``` Do not delete the old account first, and do not start a bare `provider` link when more than one -profile exists for the connector. Confirm the repair by re-reading the account and checking its -status. +profile exists for the connector. Confirm the repair by re-reading the account (after a fresh link, +the new one) and checking its status. ## Diagnose a new or suspect link from evidence From 5ffe975ceb16fca869a53855a44884650210bef1 Mon Sep 17 00:00:00 2001 From: Kenneth Ng Date: Mon, 30 Nov 2026 14:26:28 +0000 Subject: [PATCH 4/5] fix: handle an account with no connector_profile_id in the connection skill reconnect The accounts tool returns connector_profile_id as null for some accounts (unified-cloud-api accounts-tools.spec.ts), so the fallback link had no profile to use. Raised by the cubic review on #15. Co-Authored-By: Claude Opus 5.5 --- skills/stackone-connection/SKILL.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skills/stackone-connection/SKILL.md b/skills/stackone-connection/SKILL.md index 07c1083..0d5b82e 100644 --- a/skills/stackone-connection/SKILL.md +++ b/skills/stackone-connection/SKILL.md @@ -57,7 +57,8 @@ How you reconnect an expired or deauthorized account depends on the tools this s repair tool brings the same account back; a fresh link adds a new account beside the broken one. - Read the broken account with `stackone_get_accounts {id, expand: "connector,connector_profile"}`. - Its `connector_profile_id` is the profile it links through. + Its `connector_profile_id` is the profile it links through. When that is null, choose the profile + as in "Pick the profile deliberately" above. - If the session has a tool that reconnects or repairs an existing account by its id (for example `stackone_relink_account`), use it on the broken account's `id`. - Only when no such tool exists, start a fresh link through the profile the account already uses. From 5802cbceae4cfd7f8b7290369bc480ca733c9c9c Mon Sep 17 00:00:00 2001 From: Kenneth Ng Date: Wed, 2 Dec 2026 09:49:17 +0000 Subject: [PATCH 5/5] fix: confirm the new account by its id after linking in the connection skill Note the connector's account ids before starting the link, then confirm success from the id that was not there before. Without a repair tool a reconnect leaves the broken account in the list, so the old read could report success from it. Co-Authored-By: Claude Opus 5.5 --- skills/stackone-connection/SKILL.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/skills/stackone-connection/SKILL.md b/skills/stackone-connection/SKILL.md index 0d5b82e..53ff05b 100644 --- a/skills/stackone-connection/SKILL.md +++ b/skills/stackone-connection/SKILL.md @@ -44,12 +44,14 @@ stackone_link_account { connector_profile_id: "", label: "Prod `stackone_link_account` returns the auth link synchronously, but the account exists only after the user finishes in the browser. There is no status-poll tool. -1. `stackone_link_account { connector_profile_id | provider }` returns +1. Before starting the link, read `stackone_get_accounts {connector_key: [""]}` and note + the account ids it returns. +2. `stackone_link_account { connector_profile_id | provider }` returns `{ auth_link_url, expires_at, provider, connector_profile_id, next_steps }`. Give the user the `auth_link_url` to open and relay `next_steps`. -2. When the user says they are done, confirm the account exists with a read: - `stackone_get_accounts {connector_key: [""]}` returns the new account. Confirm - success from that read, never from the fact that you started the link. +3. When the user says they are done, run the same read again. The new account is the id that was + not in the first read. Confirm success from that new id, never from the fact that you started + the link or from an account that was already there. ## Reconnect a broken account; do not replace it