@zktx.io/sui-mcp 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSES/@mysten-bcs-2.0.5-Apache-2.0.txt +205 -0
  3. package/LICENSES/@mysten-sui-2.17.0-Apache-2.0.txt +201 -0
  4. package/LICENSES/@mysten-utils-0.3.3-Apache-2.0.txt +205 -0
  5. package/LICENSES/fancy-canvas-2.1.0-MIT.txt +7 -0
  6. package/LICENSES/lightweight-charts-5.2.0-NOTICE.txt +2 -0
  7. package/README.md +288 -0
  8. package/dist/adapters/adapterLifecycleValidators.js +5 -0
  9. package/dist/adapters/adapterPromptSurfaces.js +60 -0
  10. package/dist/adapters/deepbook/deepbookHumanReviewProducer.js +178 -0
  11. package/dist/adapters/deepbook/deepbookQuotePolicy.js +112 -0
  12. package/dist/adapters/deepbook/deepbookReviewEvidence.js +507 -0
  13. package/dist/adapters/deepbook/deepbookReviewLifecycle.js +85 -0
  14. package/dist/adapters/deepbook/deepbookSwapIntent.js +79 -0
  15. package/dist/adapters/deepbook/deepbookTransactionMaterialProducer.js +254 -0
  16. package/dist/adapters/intentPlanFactories.js +51 -0
  17. package/dist/adapters/reviewAdapters.js +47 -0
  18. package/dist/core/action/adapterLifecycleValidation.js +12 -0
  19. package/dist/core/action/contractNameRegistry.js +151 -0
  20. package/dist/core/action/forbiddenFields.js +43 -0
  21. package/dist/core/action/humanReadableReviewEvidence.js +193 -0
  22. package/dist/core/action/humanReadableReviewProjectionVerifier.js +29 -0
  23. package/dist/core/action/ptbVisualizationProducer.js +71 -0
  24. package/dist/core/action/receiptPtbGraph.js +29 -0
  25. package/dist/core/action/reviewCheckResults.js +6 -0
  26. package/dist/core/action/reviewStateValidation.js +11 -0
  27. package/dist/core/action/reviewTimeSimulationEvidence.js +470 -0
  28. package/dist/core/action/schemas.js +491 -0
  29. package/dist/core/action/signableAdapterContract.js +998 -0
  30. package/dist/core/action/suiChainReceiptEvidence.js +106 -0
  31. package/dist/core/action/suiChainReceiptMapping.js +107 -0
  32. package/dist/core/action/suiChainReceiptReader.js +211 -0
  33. package/dist/core/action/suiChainReceiptVerifier.js +178 -0
  34. package/dist/core/action/swapHumanReadableReviewProjection.js +130 -0
  35. package/dist/core/action/swapQuotePolicyEvidence.js +271 -0
  36. package/dist/core/action/transactionFunding.js +244 -0
  37. package/dist/core/action/transactionObjectOwnershipEvidence.js +256 -0
  38. package/dist/core/action/transactionObjectOwnershipProducer.js +323 -0
  39. package/dist/core/action/types.js +33 -0
  40. package/dist/core/action/walletReviewContractAssembler.js +286 -0
  41. package/dist/core/activity/accountAssetTimeline.js +157 -0
  42. package/dist/core/activity/accountAssetTimelineUsdcReferences.js +120 -0
  43. package/dist/core/activity/activityStore.js +16 -0
  44. package/dist/core/activity/externalActivityCoverage.js +76 -0
  45. package/dist/core/activity/externalActivityTransactionStream.js +82 -0
  46. package/dist/core/activity/localDataService.js +296 -0
  47. package/dist/core/activity/localDataTypes.js +11 -0
  48. package/dist/core/activity/localDataValidation.js +439 -0
  49. package/dist/core/activity/schemaVersion.js +2 -0
  50. package/dist/core/activity/sqliteActivityStore.js +1068 -0
  51. package/dist/core/activity/sqliteActivityStoreRows.js +389 -0
  52. package/dist/core/activity/sqliteActivityStoreSchema.js +367 -0
  53. package/dist/core/activity/sqliteActivityStoreTypes.js +5 -0
  54. package/dist/core/activity/suiFunctionTarget.js +43 -0
  55. package/dist/core/activity/transactionActivityAccountEffects.js +186 -0
  56. package/dist/core/activity/transactionActivityAnalysis.js +295 -0
  57. package/dist/core/activity/transactionActivityClassifier.js +306 -0
  58. package/dist/core/activity/transactionActivityDetails.js +229 -0
  59. package/dist/core/activity/transactionActivityProtocolRules.js +218 -0
  60. package/dist/core/activity/transactionActivityScanPolicy.js +170 -0
  61. package/dist/core/activity/transactionActivityService.js +379 -0
  62. package/dist/core/activity/transactionActivityTypes.js +18 -0
  63. package/dist/core/eventlog/sink.js +35 -0
  64. package/dist/core/evidence/settlementFamilies.js +85 -0
  65. package/dist/core/evidence/userAnswerUse.js +1 -0
  66. package/dist/core/numeric/rawU64.js +63 -0
  67. package/dist/core/preferences/preferencesStore.js +26 -0
  68. package/dist/core/preferences/sqlitePreferencesRepository.js +136 -0
  69. package/dist/core/proposal/externalProposalReview.js +347 -0
  70. package/dist/core/proposal/schemas.js +208 -0
  71. package/dist/core/proposal/types.js +35 -0
  72. package/dist/core/read/amounts.js +14 -0
  73. package/dist/core/read/coinMetadata.js +60 -0
  74. package/dist/core/read/deepbookOfficialIndexerSource.js +373 -0
  75. package/dist/core/read/deepbookRawQuoteClient.js +86 -0
  76. package/dist/core/read/deepbookReadHelpers.js +321 -0
  77. package/dist/core/read/deepbookRegistry.js +157 -0
  78. package/dist/core/read/deepbookSourceOwners.js +159 -0
  79. package/dist/core/read/deepbookUsdcChartService.js +342 -0
  80. package/dist/core/read/intentEvidenceResponseFormatting.js +228 -0
  81. package/dist/core/read/readCardInputs.js +19 -0
  82. package/dist/core/read/readCardResult.js +40 -0
  83. package/dist/core/read/readResponseGuidance.js +402 -0
  84. package/dist/core/read/readService.js +1639 -0
  85. package/dist/core/read/readServiceTypes.js +88 -0
  86. package/dist/core/read/settlementParityFormatting.js +82 -0
  87. package/dist/core/read/walletReadHelpers.js +99 -0
  88. package/dist/core/review/reviewChecks.js +45 -0
  89. package/dist/core/review/reviewComputation.js +38 -0
  90. package/dist/core/review/reviewComputationResult.js +87 -0
  91. package/dist/core/session/cardSession.js +31 -0
  92. package/dist/core/session/cardSessionStore.js +204 -0
  93. package/dist/core/session/keyedRecordStore.js +18 -0
  94. package/dist/core/session/liveReviewSessionContract.js +3 -0
  95. package/dist/core/session/localSession.js +31 -0
  96. package/dist/core/session/privateReviewArtifacts.js +75 -0
  97. package/dist/core/session/reviewValidity.js +49 -0
  98. package/dist/core/session/sessionErrors.js +9 -0
  99. package/dist/core/session/sessionRecordStore.js +40 -0
  100. package/dist/core/session/sessionStore.js +655 -0
  101. package/dist/core/session/settingsSession.js +1 -0
  102. package/dist/core/session/settingsSessions.js +45 -0
  103. package/dist/core/session/sqliteCardStore.js +88 -0
  104. package/dist/core/session/sqliteSessionStore.js +213 -0
  105. package/dist/core/session/sqliteTransactionMaterialStore.js +64 -0
  106. package/dist/core/session/sqliteWalletWorkflowStore.js +821 -0
  107. package/dist/core/session/status.js +60 -0
  108. package/dist/core/session/transactionMaterialStore.js +221 -0
  109. package/dist/core/session/transactionRequest.js +72 -0
  110. package/dist/core/session/wait.js +79 -0
  111. package/dist/core/session/walletConnection.js +92 -0
  112. package/dist/core/session/walletRuntime.js +38 -0
  113. package/dist/core/session/walletWorkflow.js +608 -0
  114. package/dist/core/session/workflowState.js +80 -0
  115. package/dist/core/session/workflowView.js +150 -0
  116. package/dist/core/suiAddress.js +18 -0
  117. package/dist/core/suiEndpoint.js +72 -0
  118. package/dist/mcp/activeAccountResponse.js +24 -0
  119. package/dist/mcp/prompts.js +146 -0
  120. package/dist/mcp/registerTool.js +19 -0
  121. package/dist/mcp/resources.js +72 -0
  122. package/dist/mcp/responseGuidance.js +326 -0
  123. package/dist/mcp/result.js +17 -0
  124. package/dist/mcp/schemas.js +11 -0
  125. package/dist/mcp/server.js +32 -0
  126. package/dist/mcp/serverInfo.js +131 -0
  127. package/dist/mcp/toolErrors.js +118 -0
  128. package/dist/mcp/toolNames.js +58 -0
  129. package/dist/mcp/tools/account/index.js +44 -0
  130. package/dist/mcp/tools/action/prepareSuiActionReview.js +126 -0
  131. package/dist/mcp/tools/read/commonSchemas.js +43 -0
  132. package/dist/mcp/tools/read/deepbookReadTools.js +686 -0
  133. package/dist/mcp/tools/read/index.js +14 -0
  134. package/dist/mcp/tools/read/readToolHelpers.js +97 -0
  135. package/dist/mcp/tools/read/reviewActivityTools.js +179 -0
  136. package/dist/mcp/tools/read/serverStatusTools.js +100 -0
  137. package/dist/mcp/tools/read/transactionActivityOutput.js +371 -0
  138. package/dist/mcp/tools/read/transactionActivityTools.js +858 -0
  139. package/dist/mcp/tools/read/walletReadTools.js +734 -0
  140. package/dist/mcp/tools/session/executionResultTools.js +44 -0
  141. package/dist/mcp/tools/session/index.js +8 -0
  142. package/dist/mcp/tools/session/shared.js +36 -0
  143. package/dist/mcp/tools/session/statusTools.js +69 -0
  144. package/dist/mcp/tools/session/walletConnectionTools.js +69 -0
  145. package/dist/mcp/tools/settings/index.js +66 -0
  146. package/dist/mcp-app/account.html +3133 -0
  147. package/dist/mcp-app/account.notices.txt +973 -0
  148. package/dist/mcp-app/chart.html +3354 -0
  149. package/dist/mcp-app/chart.notices.txt +1194 -0
  150. package/dist/mcp-app/connect.html +3179 -0
  151. package/dist/mcp-app/connect.notices.txt +1012 -0
  152. package/dist/mcp-app/receipt.html +8430 -0
  153. package/dist/mcp-app/receipt.notices.txt +3549 -0
  154. package/dist/mcp-app/review.html +8430 -0
  155. package/dist/mcp-app/review.notices.txt +3549 -0
  156. package/dist/mcp-ui/contracts.js +31 -0
  157. package/dist/mcp-ui/readCards.js +28 -0
  158. package/dist/mcp-ui/tools.js +134 -0
  159. package/dist/review-app/brand-dark.svg +1 -0
  160. package/dist/review-app/brand-light.svg +1 -0
  161. package/dist/review-app/favicon.svg +1 -0
  162. package/dist/review-app/settings.css +1 -0
  163. package/dist/review-app/settings.js +1 -0
  164. package/dist/review-app/ui.css +809 -0
  165. package/dist/review-server/assets.js +48 -0
  166. package/dist/review-server/html.js +45 -0
  167. package/dist/review-server/http.js +47 -0
  168. package/dist/review-server/middleware/hostOrigin.js +48 -0
  169. package/dist/review-server/middleware/reviewToken.js +7 -0
  170. package/dist/review-server/reviewServerPolicy.js +1 -0
  171. package/dist/review-server/server.js +72 -0
  172. package/dist/review-server/settingsApi.js +158 -0
  173. package/dist/runtime/application.js +203 -0
  174. package/dist/runtime/config.js +97 -0
  175. package/dist/runtime/localSettingsService.js +198 -0
  176. package/dist/runtime/logger.js +66 -0
  177. package/dist/runtime/reviewDependencies.js +58 -0
  178. package/dist/runtime/reviewServerAcquire.js +93 -0
  179. package/dist/runtime/runtimeTermination.js +60 -0
  180. package/dist/runtime/shared/authenticatedFetch.js +127 -0
  181. package/dist/runtime/shared/control.js +93 -0
  182. package/dist/runtime/shared/dataAccess.js +66 -0
  183. package/dist/runtime/shared/mcpHttp.js +84 -0
  184. package/dist/runtime/shared/ownerLease.js +50 -0
  185. package/dist/runtime/shared/server.js +98 -0
  186. package/dist/runtime/shared/stdio.js +113 -0
  187. package/dist/runtime/smokeMainnetRead.js +391 -0
  188. package/dist/runtime/smokeMainnetReadAssertions.js +306 -0
  189. package/dist/runtime/smokeReview.js +40 -0
  190. package/dist/runtime/start.js +90 -0
  191. package/dist/runtime/suiEndpoint.js +97 -0
  192. package/dist/runtime/suiTransactionGraphqlMapping.js +200 -0
  193. package/dist/runtime/suiTransactionGraphqlQueries.js +231 -0
  194. package/dist/runtime/suiTransactionGraphqlSource.js +148 -0
  195. package/dist/runtime/walletConnectConfig.js +3 -0
  196. package/dist/runtime/walletConnectStorage.js +99 -0
  197. package/dist/runtime/walletConnectTransport.js +128 -0
  198. package/dist/runtime/walletSdkChild.js +3 -0
  199. package/dist/runtime/walletSdkChildRuntime.js +160 -0
  200. package/dist/runtime/walletSdkIpc.js +26 -0
  201. package/dist/runtime/walletSdkProcess.js +358 -0
  202. package/docs/AGENT_BEHAVIOR.md +524 -0
  203. package/docs/AGENT_DEVELOPMENT_POLICY.md +815 -0
  204. package/docs/FRONTEND_POLICY.md +534 -0
  205. package/docs/LOCAL_DB_ARCHITECTURE.md +381 -0
  206. package/docs/MCP_SETUP.md +742 -0
  207. package/docs/MCP_TOOLS.md +1318 -0
  208. package/docs/SDK_API.md +206 -0
  209. package/docs/SIGNABLE_ADAPTER_CONTRACT.md +396 -0
  210. package/docs/TRANSACTION_ACTIVITY_LOG.md +194 -0
  211. package/docs/UTILITY_INDEX.md +275 -0
  212. package/docs/WALLET_CONNECTION.md +238 -0
  213. package/docs/golden-scenarios/BEHAVIOR_MATRIX.md +166 -0
  214. package/docs/golden-scenarios/INTENT_EVIDENCE_GOLDEN_ANSWERS.md +161 -0
  215. package/docs/golden-scenarios/INTENT_EVIDENCE_MATRIX.md +259 -0
  216. package/package.json +79 -0
  217. package/protocols/deepbook-margin.md +15 -0
  218. package/protocols/deepbook-v3.md +24 -0
@@ -0,0 +1,524 @@
1
+ # Agent Behavior Reference
2
+
3
+ This document is the MCP-exposed answer playbook for AI clients. It owns user-question flows, tool selection, and response wording boundaries.
4
+
5
+ It does not define tool schemas or field contracts. Use `docs/MCP_TOOLS.md` for the MCP API reference, response fields, statuses, and follow-up fields.
6
+
7
+ It is not the contributor rulebook and it is not enforcement. Development rules live in `AGENTS.md` and `docs/AGENT_DEVELOPMENT_POLICY.md`. Hard product boundaries live in code, schemas, allowlists, mainnet guards, and the local review layer.
8
+
9
+ ## Support Matrix
10
+
11
+ | Surface | Status | Behavior |
12
+ | --- | --- | --- |
13
+ | Sui mainnet state reads | Current | Use read tools for supported balances, DeepBook pools, token registry metadata, mid-price snapshots, orderbook context, raw-quantity quotes, and DeepBook account inventory. |
14
+ | DeepBook USDC candle-history reads | Current DeepBookV3 official Indexer candle evidence | `read.get_deepbook_usdc_price_history` reads DeepBookV3 official Indexer USDC candles for the requested official interval. `read.get_deepbook_usdc_price_at_time` selects the candle for or nearest to one target UTC time and identifies `matchedCandle.close` as the representative price. Treat both as external official Indexer candle evidence, not a live quote, chain recomputation by Sui MCP, USD value, route choice, P&L, tax, transaction-building input, signing readiness, or user-account history. |
15
+ | Account, Receipt and DeepBook USDC cards | Internal read-only MCP Apps | Use `ui.open_account`, `ui.open_receipt`, or `ui.open_chart` for an interactive read card. They display server-read facts and do not sign, submit transactions, rank routes, compute fiat USD value, P&L, tax or cost basis. |
16
+ | DeepBook swap review sessions | Internal Review card and backend WalletConnect | Account-bound review independently verifies stored material, digest, ownership, policy, human-readable facts, simulation and PTB evidence. An explicit app-only action and the wallet approval authorize one backend request. Ordinary MCP responses are facts, never signing authority or bytes. |
17
+ | External proposal review sessions | Non-signable review in the current release | `action.prepare_external_proposal_review` can create an internal Review card from a structured external payment or Sui action proposal. Treat the proposal as untrusted display and review context only. It does not build, verify, simulate, sign, or execute transaction material. |
18
+ | Wallet signing | User-approved WalletConnect request | The backend validates returned bytes and signer against the admitted review and submits once. The card and model never receive bytes or signatures. |
19
+ | PTB visualization | Rendered with emitted wallet review contracts | `reviewState.ptbVisualization` can accompany an emitted wallet review contract as a Mermaid flowchart decoded from the stored transaction bytes with no AI or model input, shown only after those bytes recompute to the bound commitment. Treat it as visualization evidence only, not transaction-building input, wallet authorization, signing data, signing readiness, payment execution readiness, or route recommendation. |
20
+ | Transaction material and execution | Verified supported swaps under user control | Stored mainnet material is used only after review and wallet approval. External proposals stay non-signable. Fiat cash-out, P&L, tax, cost-basis, route ranking and automatic settlement choice remain unsupported. |
21
+ | Private-key custody, autonomous trading, fiat USD peg claims, and quote-only coverage or readiness claims | Unsupported safety and correctness boundary | Do not custody funds, hold private keys, or autonomously trade. Do not treat settlement assets as fiat USD, bank cash-out amounts, or peg guarantees. Do not turn quote-only conversion candidates into payment coverage, funding readiness, payment execution readiness, or signing readiness. |
22
+ | Silent settlement-token selection and route ranking | Out of scope by current design | Do not silently choose USDC, USDT, or another settlement token for the user. Do not rank venues, choose routes, or make best-price recommendations. |
23
+ | Other chains, autonomous trading, alerts, arbitrary Move calls, investment advice | Unsupported | Say the request is unsupported and redirect to available Sui mainnet read or review capabilities. |
24
+ | Payment execution | Not a current capability | Intent evidence is separate from execution and does not build or execute payments. Do not describe payment execution as available. |
25
+ | Lending, staking, relative balance actions | Unsupported | Do not describe executable actions for these categories as available product functionality. |
26
+
27
+ ## Meta Principles
28
+
29
+ - AI self-reports do not appear in user-facing checkout output.
30
+ - User-facing checkout output should contain server-validated structured facts.
31
+ - Ambiguous natural language is narrowed through structured evidence first, then clarification only where a user decision is required.
32
+ - Important UX rules should move into schemas, UI, and tests when the implementation boundary exists.
33
+
34
+ ## Question First
35
+
36
+ Answer the user's question before moving toward an action.
37
+
38
+ When a tool response includes `userAnswerUse`, treat it as the response-local answer guide:
39
+
40
+ - check `userAnswerUse.preconditionFields` before using answer fields;
41
+ - use `userAnswerUse.answerFields` for the user-facing answer;
42
+ - apply `userAnswerUse.conclusionRuleFields` as limits on the final conclusion;
43
+ - use `userAnswerUse.diagnosticOnlyFields` only for source, limitation, pagination, or troubleshooting context;
44
+ - do not answer claims listed in `userAnswerUse.cannotAnswer`;
45
+ - when present, use `userAnswerUse.followUp.inputFields` as the fields to pass into `userAnswerUse.followUp.tool`, then use `userAnswerUse.followUp.answerFields` in that follow-up response.
46
+
47
+ When a USD-denominated settlement-asset response includes `toolAvailability`, check `toolAvailability.requiredToolsAvailable`.
48
+ If it is `false`, say the current MCP server build cannot support the answer and do not use amount fields for the user-facing answer.
49
+
50
+ If the user asks "What is 1 SUI worth?", answer with the current read context available to the tools. Do not ask for a wallet or create a checkout unless the user asks to prepare an action.
51
+
52
+ For SUI price questions:
53
+
54
+ - Call `read.get_deepbook_mid_price` with `poolKey: "SUI_USDC"` as the Sui MCP product source for supported SUI/DeepBook price context.
55
+ - Present the result as "DeepBook SUI/USDC mid price at `fetchedAt`" and do not call it the global market price.
56
+ - If the user asks for another stable pair or another token, use `read.list_deepbook_tokens` and `read.list_deepbook_pools` to find the registered pool, then call `read.get_deepbook_mid_price` for that pool.
57
+ - When multiple pools match and the user did not name the quote token, use this split:
58
+ - For explicit pool-price questions, prefer a USDC-quoted pool, then USDT.
59
+ - For USD-denominated payment, balance, shortfall, coverage, settlement, or cash-out wording, use the intent-evidence flow instead.
60
+ - Name the pool checked and state that this is pool quote-token context, not settlement-token selection.
61
+ - If the token or pool is not in the pinned DeepBook registry, or the tool returns `quote_unavailable` or `registry_miss`, say DeepBook cannot provide that price from the current registry.
62
+ - Use external web data only if the user explicitly asks for non-product market context. Label it as outside Sui MCP verified state.
63
+ - If the tool returns `internal_error`, retry the same DeepBook price tool once. Do not retry more than once; if it still fails, say DeepBook read failed and do not present a price as Sui MCP verified state.
64
+
65
+ For DeepBook USDC candle-history questions:
66
+
67
+ - Use `read.get_deepbook_usdc_price_at_time` when the user asks for one supported official USDC-quoted DeepBook pool price at one target time, such as "3 hours ago" after resolving the target to a canonical UTC timestamp.
68
+ - Use `read.get_deepbook_usdc_price_history` when the user asks for observed DeepBook USDC historical candles, OHLCV-like bars, or a UTC range for a supported official USDC-quoted DeepBook pool.
69
+ - If the user asks to view a chart, use `ui.open_chart`. For account assets or a transaction result card, use `ui.open_account` or `ui.open_receipt`. Use ordinary read tools for ordinary evidence answers. If the host returns `ui_unavailable`, explain the UI limitation; do not invent an external page URL. A still-valid unsubmitted card remains usable after chat navigation; the backend owns its state. An accepted, expired or invalidated input is not reactivated; request a new card for a different selection. If a submit reply is lost, read that card’s current state rather than asking to submit again. Missing permission or receipt display details are limitations, not evidence that the user supplied no input.
70
+ - Provide exactly one selector: `poolName`, `assetSymbol`, or `coinType`. For the at-time tool, provide `targetTime` as a canonical ISO 8601 UTC timestamp. For the range-history tool, provide `start` and `end` as canonical ISO 8601 UTC timestamps. Use `interval` only with the official values accepted by the tool schema; omitted `interval` uses `15m`.
71
+ - For `read.get_deepbook_usdc_price_at_time`, answer from `target`, `match`, `matchedCandle`, `candleAvailability`, `source.candles`, `quantitySemantics`, and `responseSummary`. Use `match.representativePrice.value`, which is `matchedCandle.close`, as the representative target-time price. Say whether the match is `exact_bucket`, `nearest_before`, or `nearest_after`, and mention `match.distanceMinutes` when it is not zero.
72
+ - For `read.get_deepbook_usdc_price_history`, answer from `bars`, `candleAvailability`, `source.candles`, `quantitySemantics`, and `responseSummary`.
73
+ - Describe the result as DeepBookV3 official Indexer USDC candle evidence for the requested official interval.
74
+ - Say that USDC is a token-denominated quote asset here, not fiat USD and not a USDC/USD peg guarantee.
75
+ - If a tool returns `unsupported_pair`, `unsupported_range`, `source_unavailable`, or `no_price_in_search_window`, report that status and reason. Do not synthesize candles, interpolate missing bars, carry forward the previous bar, run an on-demand chain-history scan, or web-search a replacement unless the user explicitly asks for outside Sui MCP context.
76
+ - Candles are not user-account transaction history or user-account balance history.
77
+ - Do not use these tools for live price, current mid price, execution price, global market price, USD value, cash-out value, P&L, tax, cost basis, route selection, best-price advice, transaction building, or signing readiness.
78
+
79
+ For indicative quote questions such as "If I sell 10 SUI, how much dollar value do I get?":
80
+
81
+ - Use `read.quote_deepbook_display_amount` only after the source asset, source input amount, pool or quote asset, and direction are known.
82
+ - A user saying "dollars" does not by itself select USDC, USDT, or another quote token.
83
+ - If the user names a source asset and says dollars without naming a quote token, first distinguish the intent:
84
+ - For USD-denominated payment coverage, balance total, shortfall, settlement, or cash-out wording, use settlement-asset-group intent evidence when account context is available.
85
+ - If account or target evidence is missing, ask only for that missing evidence.
86
+ - For a wallet-free market quote, ask which registered DeepBook quote asset or pool they want, such as SUI/USDC or SUI/USDT.
87
+ - Disclose the exact pool and `fetchedAt` after the user selects it.
88
+ - Do not silently choose a quote token.
89
+ - Do not web-search or finance-query a USDC/USD conversion unless the user explicitly asks for outside Sui MCP market context.
90
+ - Treat `amountDisplay` as the source input amount for the chosen direction. Do not use it as an output target amount.
91
+ - If the user asks how much source asset is needed to make a target output amount, say inverse quotes are unsupported in this release and ask for a source input amount instead.
92
+ - Treat `quantitySemantics.kind: "deepbook_quote_display_amount"` as exact decimal display quote strings only.
93
+ - Treat `rawQuote.kind: "deepbook_quote_raw_u64"` as raw quote evidence before slippage policy.
94
+ - Do not turn a quote into final min-out, effective price, price impact, route recommendation, funding source, fiat cash-out, P&L, cost basis, transaction-building input, signing data, or signing readiness.
95
+ - Do not compare a DeepBook quote to `read.get_deepbook_mid_price` as user-facing slippage or price impact. Mid price is a pool snapshot, and current quote tools do not return price-impact evidence.
96
+ - Do not use quote proceeds as profit, P&L, tax, performance, or cost basis.
97
+ - If the user asks for profit after a quote, say Sui MCP can report quote proceeds and raw activity evidence, but it does not compute P&L.
98
+ - Do not provide profit formulas or hypothetical profit examples, even when the user supplies an assumed acquisition price.
99
+
100
+ ## Current Release Evidence
101
+
102
+ Answer only from current tool evidence. For natural-language dollar, USD-like, stablecoin, or Korean dollar-word requests, use this flow:
103
+
104
+ 1. Call `read.get_server_status`; require the current evidence policy plus `read.list_settlement_asset_groups` and `read.preview_intent_evidence`.
105
+ 2. Call `read.list_settlement_asset_groups`.
106
+ 3. Call `read.preview_intent_evidence` for settlement-asset coverage, balance-total, or shortfall questions.
107
+ 4. Confirm `toolAvailability.requiredToolsAvailable` is `true`.
108
+ 5. Use `userAnswerUse.answerFields` for the answer. Settlement-asset-only responses use `responseSummary`; selected-target responses also use `selectedTarget`, `candidateConversions`, and `requiredUserChoices` when those fields are listed.
109
+
110
+ `responseSummary.answerCompleteness.answerCompleteFor` names the answer class. Use only the fields in `responseSummary.answerCompleteness.requiredAnswerFields` and `userAnswerUse.answerFields` for that class.
111
+
112
+ For selected-target direct quote evidence, require both `responseEvidence.supportedResponseClaims: "direct_pool_quote_evidence"` and `userAnswerUse.canAnswer: "direct_pool_quote_evidence_for_user_selected_target"` in the same `read.preview_intent_evidence` response. If either entry is absent, do not say that direct pool quote evidence is available from that intent-evidence response.
113
+
114
+ Do not call quote tools for the same payment coverage, balance-total, or shortfall question when `responseSummary.doNotCallQuoteToolsForThisQuestion` is `true`.
115
+
116
+ When `toolAvailability.requiredToolsAvailable` is `true` and `responseSummary.doNotCallQuoteToolsForThisQuestion` is `true`, answer from `responseSummary` and stop the same question flow. Do not call `read.classify_wallet_assets`, `read.summarize_wallet_assets`, or quote tools to look for other source tokens for that same coverage, balance-total, or shortfall question. Use those tools only when the user asks a separate inventory or conversion question.
117
+
118
+ If quote tools were already called, do not use those quote numbers for the payment amount, coverage status, or shortfall. Use only the fields named by `responseSummary.amountsUsedForAnswer`.
119
+
120
+ If `read.preview_intent_evidence.userAnswerUse` is present, its `answerFields` names the exact response fields to use for the answer.
121
+
122
+ Use `read.summarize_settlement_asset_group_parity` and its `responseSummary` for stablecoin-like max, min, mean, median, or internal parity questions. A parity reference asset is a measurement basis, not a settlement choice.
123
+
124
+ Selected-target evidence is allowed only when the user selected the target settlement asset in the current request or prior user context.
125
+
126
+ When that is true, use `targetAssetSelectionSource: "user_explicit"` or `"prior_user_explicit_context"` and answer from the returned selected-target fields. Do not set a target source for an AI-inferred target.
127
+
128
+ For shortfall questions without an established target amount, ask for the missing display target amount. Do not narrow the question to USDC/USDT, choose source assets, or merge non-group quote outputs into payment coverage.
129
+
130
+ Partial wallet context is allowed when a connection-qualified default asset account is available or the user gives an explicit Sui address.
131
+
132
+ Use supported reads to expose only returned facts:
133
+
134
+ - current coin-balance classes;
135
+ - supported settlement-asset-group balances;
136
+ - required user choices;
137
+ - uninspected inventory blockers.
138
+
139
+ Do not turn partial context into route recommendation, payment support, portfolio planning, P&L, transaction-building input, signing data, or signing readiness.
140
+
141
+ ## Read Vs Action
142
+
143
+ Read-only requests split into address-free reads and address-scoped reads.
144
+
145
+ - Address-free reads include pool lists, orderbook context, mid prices, and quote facts.
146
+ - Address-scoped reads include explicit public-address snapshots and active-account reads.
147
+ - Use the explicit address when the user asks about a specific Sui address.
148
+ - Use wallet connection only when the request needs active account context.
149
+ - Action-preparation requests use words such as prepare, review, swap, buy, sell, or sign.
150
+
151
+ When an action is unsupported or blocked, say so plainly and offer the closest read-only information.
152
+
153
+ For token balances and quantities:
154
+
155
+ - Do not infer decimals from token symbols or common defaults.
156
+ - Use a returned `display` amount only when the tool provides it.
157
+ - If a result exposes only a raw amount or reports `unit.status: "unavailable"`, say display conversion is unavailable.
158
+ - Wallet balance reads are current coin-balance snapshots only.
159
+ - Transaction activity fields named `amountRaw`, `increaseRaw`, `decreaseRaw`, or `netRaw` are raw integer facts.
160
+ - Do not divide raw amounts into display units unless the same response provides verified decimals or a display amount for that asset.
161
+
162
+ If an action plan exposes `assetFlowPreview.amountKind: "display_intent"`, treat the amount as proposal/display context only. Do not convert it into a raw amount, minimum output, simulation fact, or signing input.
163
+
164
+ For `action.prepare_external_proposal_review`, answer from
165
+ `plans[].reviewModel` when the response `userAnswerUse.answerFields` lists that
166
+ path. Use `proposedAction`, `assetFlow`, `recipients`, `targets`,
167
+ `missingEvidence`, `requiredUserChoices`, `unsupportedClaims`, `freshness`,
168
+ `blockingChecks`, and `nonSignableReason`. Do not treat the proposal as trusted
169
+ transaction material. Do not treat it as route selection. Do not treat it as
170
+ settlement-token selection. Do not treat it as payment execution readiness. Do
171
+ not treat it as signing data or signing readiness.
172
+
173
+ After a DeepBook review session is wallet-account bound, `session.get_review_status` can include review-state checks, `reviewState.adapterLifecycle`, `reviewState.humanReadableReview`, and `reviewState.simulation`. The Review card renders those fields as local review evidence.
174
+
175
+ Use `reviewState.adapterLifecycle.stageCatalogId`, `completedStages`, and `missingStages` only to explain which account-bound DeepBook review evidence stage catalog is being used, which stages have run, and which required review evidence stages are still missing. If `transaction_material_build_or_verify` is completed, say only that the review server built local unsigned transaction material and kept bytes internal. If `digest_commitment` is completed, say only that the review server internally bound a Sui transaction digest to that stored local material. If `object_ownership` is completed, say only that the review server derived object ownership evidence from the stored local material and Sui owner/type reads. If `review_time_simulation` is completed, say only that the review server simulated the stored local unsigned material with checks enabled and exposed a redacted simulation summary. `reviewState.humanReadableReview` is valid only after `human_readable_review` is completed and not missing; `reviewState.simulation` is valid only after `review_time_simulation` is completed and not missing. Do not provide or infer transaction bytes, signing data, signing readiness, or execution readiness from those stages. The review lifecycle is pre-authorization evidence. The backend admits an explicit Review-card selection, requests approval in the wallet, verifies digest and signer, and records independently read mainnet effects separately from request status. Use those checks to explain what the local review layer verified before signing. Do not describe them as wallet readiness, signing readiness, route quality, execution safety, or public transaction bytes. The MCP layer never signs, executes, or returns transaction bytes.
176
+
177
+ Use `reviewState.humanReadableReview` only as displayable review facts projected
178
+ from verified local review evidence. Its `kind` currently identifies the shared
179
+ DeepBook swap review projection. Its `assetFlow` raw amounts, coin types, decimals,
180
+ minimum output, fee facts, target pool, and direction are derived from the
181
+ material-bound quote policy evidence, while object ownership is cited only as
182
+ review evidence from stored transaction material and Sui owner/type reads.
183
+ Do not use `reviewState.humanReadableReview` as transaction bytes, a public transaction digest, signing data, signing readiness, route quality, wallet handoff, or execution readiness.
184
+ Treat any display amount in this field as presentation context only, not as a
185
+ signing or review-time simulation input. Its explanatory notes, including missing evidence and unsupported claims, were recorded
186
+ during the human-readable evidence stage. Use the final review checks and
187
+ adapterLifecycle.missingStages for current missing stages; do not present an
188
+ earlier simulation note as a current failure after simulation completed.
189
+
190
+ Use `reviewState.simulation` only as a public summary of server-side
191
+ review-time simulation evidence for the stored local material. It can explain
192
+ provider, enabled checks, success, raw Sui gas cost summary components, balance
193
+ changes, and object changes when those fields are returned. It is not
194
+ transaction bytes, not a public transaction digest, not signing data, not
195
+ signing readiness, not wallet handoff, not execution readiness, not execution
196
+ receipt evidence, and not proof that a wallet signed or submitted a transaction.
197
+
198
+ `reviewState.transactionReviewData` is present only on a
199
+ `ready_for_wallet_review` state, after every review evidence stage
200
+ completed and contract assembly passed schema validation. Use it only as
201
+ pre-signing review evidence that binds the human-readable review and the
202
+ review-time simulation to one transaction commitment hash. It is not
203
+ transaction bytes, not signing data, not signing readiness, not wallet
204
+ handoff, not execution readiness, and not a route recommendation. If the
205
+ review is blocked on `wallet_review_contract_emit_missing`, say that contract
206
+ assembly declined and use the failed adapter-prefixed emit-missing check message
207
+ for the concrete reason: `deepbook_wallet_review_contract_emit_missing` for a
208
+ DeepBook review.
209
+
210
+ If `reviewState.evidenceValidity` is `invalidated`, explain the preserved failure
211
+ using its reason and checks. Material-derived facts have been removed, and the
212
+ adapter stages describe the last computation, not current usable evidence.
213
+ Do not describe material as available or infer automatic retry from that history.
214
+
215
+ If a response includes a `PtbVisualizationArtifact`, answer from its Mermaid
216
+ text, diagnostics, `generatedAt`, `source`, and `unsupportedUse` fields only
217
+ when the response-local guide lists them as answer fields. Do not treat a PTB
218
+ graph as transaction material, raw transaction bytes, or wallet authorization.
219
+ A PTB graph is not signing data, not signing readiness, not payment execution
220
+ readiness, not route quality, and not execution safety.
221
+
222
+ Use these response fields:
223
+
224
+ - wallet balance amounts: `read.summarize_wallet_assets`;
225
+ - coin-balance classes: `read.classify_wallet_assets`;
226
+ - USD-denominated coverage, total, or shortfall: fields listed by `read.preview_intent_evidence.userAnswerUse.answerFields`;
227
+ - stablecoin-like parity: `read.summarize_settlement_asset_group_parity.responseSummary`;
228
+ - DeepBook BalanceManager inventory: `read.summarize_deepbook_account_inventory`.
229
+
230
+ For USD-denominated coverage and shortfall, answer from `responseSummary.currentDisplayAmount`, `responseSummary.requiredDisplayAmount`, and `responseSummary.shortfallDisplayAmount` according to `responseSummary.amountsUsedForAnswer`.
231
+
232
+ Use `responseSummary.separateQuoteOutputs` to explain separate quote calls. When it returns `usedForPaymentAnswer: false` or `usedForShortfallAnswer: false`, do not add those quote outputs to the payment amount or shortfall amount.
233
+
234
+ Use `responseSummary.doNotUseForConclusion` and `responseSummary.excludedFromConclusion` as exclusion rules for the final conclusion. If those fields name separate quote results, outside-settlement-group assets, or route-dependent payment support, do not write a conclusion such as "including other assets", "if everything is converted", "combined", or "still short" from quote outputs.
235
+
236
+ Interpret common `quantitySemantics.kind` values this way:
237
+
238
+ - `sui_wallet_balance_snapshot`: current coin-balance snapshot only.
239
+ - `sui_intent_evidence_report`: pre-transaction evidence summary only.
240
+ - `deepbook_official_indexer_candles`: DeepBookV3 official Indexer USDC candle evidence for the requested official interval only.
241
+ - `deepbook_display_number`: display-like account inventory only.
242
+
243
+ Use quote tools only for explicit source inputs:
244
+
245
+ - Use `read.quote_deepbook_action` only when a raw integer amount is explicit.
246
+ - Use `read.quote_deepbook_display_amount` when the user provides a decimal source input amount.
247
+
248
+ Do not use quote tools as a follow-up to a payment coverage, balance-total, or shortfall answer when `read.preview_intent_evidence.responseSummary.doNotCallQuoteToolsForThisQuestion` is `true`.
249
+
250
+ Treat DeepBook `rawQuote` fields as exact quote evidence from simulated `u64` return values.
251
+
252
+ Do not turn quote evidence into:
253
+
254
+ - final min-out;
255
+ - effective price;
256
+ - price impact;
257
+ - venue comparison;
258
+ - best route;
259
+ - fiat cash-out;
260
+ - unsupported P&L or cost basis;
261
+ - signing input.
262
+
263
+ Treat `uninspectedAssetClasses` as explicit classifier-uninspected boundaries, not as zero balances.
264
+
265
+ Inventory facts do not imply:
266
+
267
+ - that the held assets can be spent or transferred;
268
+ - funding availability;
269
+ - route liquidity;
270
+ - payment readiness;
271
+ - portfolio completeness;
272
+ - transaction-building inputs;
273
+ - signing data;
274
+ - signing readiness.
275
+
276
+ Treat `quantitySemantics.kind: "settlement_asset_group_parity_snapshot"` as internal settlement-asset-group parity evidence only.
277
+
278
+ The returned `responseSummary.referenceAssetRole: "measurement_reference_not_settlement_choice"` means the reference is a measurement basis, not the user's settlement token.
279
+
280
+ The summary exposes min, max, mean, and median parity from available direct DeepBook mid-price snapshots.
281
+
282
+ Do not treat parity output as fiat USD value, USDC/USD peg assumption, payment readiness, route recommendation, transaction building, signing readiness, P&L, or cost basis.
283
+
284
+ If a wallet read returns `metadata_cache_unavailable`, retry the same wallet read once.
285
+
286
+ If it repeats, say the local coin metadata cache is unavailable and the wallet display-unit read cannot be completed right now.
287
+
288
+ Treat `details.operation` as diagnostic context, not as a user action field.
289
+
290
+ When the user says only `$1000`, "1000 dollars", "stablecoins", or Korean dollar-word wording, do not choose USDC, USDT, source assets, or routes. Use the intent-evidence flow and ask only for `responseSummary.requiredUserChoices`.
291
+
292
+ For common USD-denominated evidence questions:
293
+
294
+ | User asks | Tool input | User response field |
295
+ | --- | --- | --- |
296
+ | "Can I cover a 1000 dollar payment?" | `read.preview_intent_evidence` with `intentKind: "cover_payment_like_amount"`, `denomination: "dollar"`, `requiredDisplayAmount: "1000"` | `responseSummary` |
297
+ | "How much are my USD-denominated assets together?" | `read.preview_intent_evidence` with `intentKind: "summarize_settlement_asset_group_balance"`, `denomination: "dollar"` | `responseSummary` |
298
+ | "What is the shortfall?" | Reuse the established target amount, or ask for the missing display target amount | `responseSummary` |
299
+
300
+ Describe an active wallet account as read context, not login, proof of
301
+ ownership, standing signature approval or custody. Explicit public-address
302
+ reads do not set that context. Account clearing does not disconnect a wallet.
303
+
304
+ - For current asset reads with no address supplied by the user, read `session.get_interaction_status` and use `assetReadAccount.account` only when its status is `available`. If that default is unavailable and the requested tool accepts `account`, ask for a Sui address in chat. For `read.summarize_deepbook_account_inventory`, a typed address is unsupported: follow its connection/account-selection guidance instead. Do not copy a remembered or stored active address into an explicit argument to bypass this condition. Explicit user-provided addresses remain public reads without a connected wallet. A stored active account is not proof of a current connection.
305
+ - If a different saved connection remains after disconnection, matching addresses do not carry the old default selection into it. The user can choose Use address in Connect. Use the returned `assetReadAccount`, not a count of recorded connections or an address match, to describe the default. A stored connection past its expiry is not a current usable choice or proof of remote removal.
306
+ - Before opening a connection card, use the same status response's `connections`, `connectionConflict` when present, and `walletAvailability`. For a connect request, if the requested wallet is already connected, report that fact without opening another card. For a disconnect request, if no connection is recorded and wallet state is available, report that there is no connection to disconnect. Unavailable wallet state does not prove no connection. Do not ask for another pairing when one is pending.
307
+ - Collect a missing account address or transaction hash in chat before opening an Account or Receipt card. Use a hash already supplied for the requested transaction; do not ask for it again. If a tool returns `input_required`, ask for its named input without retrying or claiming a failure. These cards have no input forms.
308
+
309
+ For a connected-account-only read, use `session.get_interaction_status` to distinguish an unavailable wallet service, pending operations, and missing connection/selection. Report wallet-service unavailability and recovery guidance without proposing another pairing. If an operation is pending, use its existing cardId with the connection get/wait tools. Otherwise, explain that the user must request connection or account selection to continue; do not start that operation automatically.
310
+
311
+ 1. `account.get_active_account` reports the stored selection, with `source` and `setAt`. For current assets without a user-provided address, use `session.get_interaction_status.assetReadAccount` to check whether that selection is a usable default. If not, request an address only for tools that accept `account`; connected-account-only tools require the connection/account-selection flow. Do not infer current connection from the stored selection.
312
+ 2. An explicit connect/reconnect/disconnect/account replacement request opens an internal
313
+ Connect card with `session.create_wallet_connection`: use `intent: connect` for requested pairing, `intent: disconnect` for requested disconnection, and `intent: manage` for inspection or account selection. The model must not call app-only actions on the user's behalf.
314
+ For "disconnect my wallet", when the wallet service is available and the target is connected, open `session.create_wallet_connection` with `intent: disconnect`. For one connected target the card shows Confirm disconnect or Back directly; Back only returns to the connection view; it does not submit Cancel review or disconnect. The card starts no pairing. Do not substitute `account.clear_active_account`, claim disconnection is unsupported merely because there is no direct model-facing disconnect tool, or equate disconnection with revoking onchain permissions. If disconnection is already pending, read or wait on that exact card instead of opening another operation.
315
+
316
+ 3. `session.get_wallet_connection` and `session.wait_wallet_connection` use the
317
+ returned cardId. An unsubmitted card needs input; waiting does not create a
318
+ pairing. Pairing credentials/QR never belong in chat text.
319
+ 4. After connection/account selection, read `session.get_interaction_status` and confirm `assetReadAccount` is available before
320
+ stating which account is active. A connected session and active context are
321
+ separate facts, especially after clear or a multiple-account approval.
322
+ 5. A wait timeout does not prove failure, disconnection or a remote dialog's
323
+ cancellation. Report the actual stored outcome and pending user action.
324
+
325
+ Use `session.get_interaction_status` for bounded pending interactions. A Review
326
+ status of `ready_for_wallet_review` is displayed as Ready for your review: the
327
+ review details are available to inspect. It does not mean that approval can be
328
+ requested now or that the wallet has a pending signing request. Request status is
329
+ reported separately. A completed request has independently observed chain
330
+ success/failure. stopped, request_failed and outcome_unknown never imply chain
331
+ failure or absence of execution. Use `session.get_execution_result` to read the
332
+ known digest without resubmitting. `session.open_review_management` requires the
333
+ exact reviewSessionId and attemptId and grants no new signing/refresh action.
334
+ With one available wallet/account, the live Review card prepares and renews verified conditions automatically. The user inspects the PTB and amounts, then chooses Request wallet approval. Multiple valid connections must first be resolved through target-specific disconnection; several approved addresses belong to one connection. Failed preparation may need Retry review. Do not ask users to manually update after normal review-detail expiry; the card updates automatically when permitted. Receipt and completed Review show the actual transaction graph when private display metadata is available, followed by observed results. Additional facts are in Details; missing metadata means the graph is unavailable, not that the transaction has no inputs.
335
+
336
+ Frame recreation and chat navigation first reread the same DB state. Only a currently permitted live View can continue its backend-directed automatic preparation; completed, managed and public saved cards never restart it. SDK restoration does
337
+ not replay a financial request or restore cleared read context.
338
+
339
+ Treat `walletAvailability` as the local connection service's state and
340
+ `walletObservation` as its last confirmed observation, not the wallet app's live
341
+ screen. `initializing` and `recovering` do not mean the user rejected anything.
342
+ If `connectionConflict` is present, explain that several saved connections
343
+ prevent using a wallet. On the user's request, open Connect/manage for them to
344
+ confirm the connections they want to disconnect. Do not choose the first or
345
+ most recent connection, change the default address or call `ui.act_card` for
346
+ them. `allowedActions` describes permitted action types, not all buttons visible
347
+ in a particular frame. In particular, a card without a target does not show
348
+ Disconnect or Use account merely because a general action name was mentioned.
349
+
350
+ There is no service-restart button in Connect or Settings. If the service is
351
+ unavailable or disconnection remains unresponsive, explain the operational
352
+ procedure in the setup guide: fully quit all apps using Sui MCP, then
353
+ reopen them. Closing only a non-owning app or a window may leave the shared
354
+ backend running. Do not kill processes or repeatedly send wallet commands for
355
+ the user, and do not report restart success before the new service is observed.
356
+
357
+ A failed `connectionAction: "disconnect"` means removal was not confirmed.
358
+ Direct the user to inspect/remove the retained connection in their wallet app.
359
+ App restart does not prove remote revocation or cancel a transaction on Sui.
360
+ Already submitted transactions keep their digest and remain readable; a new
361
+ signature requires a fresh valid review and explicit wallet approval. Historical
362
+ service-recovery results describe only their recorded local outcome and offer
363
+ no new action. Do not describe ordinary waiting as a failure.
364
+
365
+ Display shortened lowercase addresses by default and full addresses when exact
366
+ verification is needed. For user-requested local review history, use:
367
+
368
+ - `read.list_review_activity`;
369
+ - `read.summarize_review_funnel`;
370
+ - `read.get_review_session_detail`.
371
+
372
+ The optional `account` input is a read filter. It does not change active account context.
373
+
374
+ `accountSource` reports how the read scope was selected, not proof of wallet ownership.
375
+
376
+ Sui activity tools answer user-requested transaction questions from GraphQL read results and stored normalized facts.
377
+
378
+ Use the summary path first:
379
+
380
+ - `read.summarize_sui_activity_scan` for recent activity, latest activity, asset-flow summary, protocol summary, gas summary, or failure summary.
381
+ - `read.scan_sui_account_activity` when the user asks for bounded transaction rows.
382
+ - `read.inspect_sui_transaction` when the user provides one digest or asks for digest-level detail.
383
+ - `read.summarize_sui_account_activity` only for stored local activity facts.
384
+ - `read.get_account_asset_timeline` for stored account asset net-flow bars over a UTC range after relevant activity has been scanned and stored.
385
+
386
+ Important scan boundaries:
387
+
388
+ - Scans are bounded to at most 100 results per call and are not background indexing.
389
+ - `orderingVerified: false` means provider ordering was not proven.
390
+ - `continuationCursor` is best-effort provider pagination, not a durable index cursor.
391
+ - Use live scan evidence for "latest N" unless the user asks for stored facts.
392
+
393
+ Wallet-specific balance evidence must come from requested-account fields:
394
+
395
+ - `requestedAccountTransactionFacts`;
396
+ - `requestedAccount.coinFlows`;
397
+ - `transactions[].requestedAccountEffect`.
398
+
399
+ Do not use transaction-level context as wallet-specific balance evidence. `transactionContext` intentionally has no transaction-wide balance-change aggregate in live scan rows. Use `transactionContext`, `compact`, `details`, `execution`, or `requestedAccountEffect` in an answer only when the same response returns that field and lists it in `userAnswerUse.answerFields`.
400
+
401
+ For Sui activity array paths, `userAnswerUse.answerFields` lists `transactions[].transactionContext`, `transactions[].compact`, or `transactions[].details` only when every returned `transactions` row has that field. When `transactionDetailAvailability.detailAvailability: "some"`, some rows have details and some do not; use `transactionDetailAvailability` in the answer and inspect the specific row or follow-up digest lookup before using row details.
402
+
403
+ Incomplete balance evidence means unknown, not zero:
404
+
405
+ - `accountBalanceChangeEvidence: "incomplete_account_balance_changes"` is not zero-balance evidence.
406
+ - `account_balance_changes_unavailable` is not zero-balance evidence.
407
+ - `accountBalanceChangeInferencePolicy: "do_not_infer_from_transaction_context"` means do not infer the requested account amount from transaction context, visible recipient patterns, current wallet balances, compact counts, or aggregate analysis.
408
+ - Only `no_account_balance_changes_returned` with complete details supports saying no requested-account balance change was returned.
409
+
410
+ Compact and analysis fields are transaction or page facts:
411
+
412
+ - `compact.factScope: "transaction"` means compact fields summarize the transaction, not the requested wallet.
413
+ - `analysis.coinFlows` is a transaction/page aggregate, not wallet-specific evidence.
414
+ - `protocolMatches` are conservative activity labels derived from normalized facts.
415
+ - `mvrName` is package-resolution evidence, not protocol support, P&L, route quality, transaction-building input, signing data, or signing readiness.
416
+
417
+ Raw amount handling:
418
+
419
+ - Balance-change quantities are raw integer strings.
420
+ - There is no `details.balanceChanges[].amount` field.
421
+ - Do not coerce missing fields to `number`.
422
+ - Gas raw quantities use MIST.
423
+ - Prefer returned `gasCost.display` or `analysis.gas.netGasCost.display` over manual gas conversion.
424
+
425
+ If returned evidence is incomplete or unverified, say so before using it. If a transaction or explicit address scan is unrelated to a known local wallet, say it was not saved locally and use the ephemeral result only for the current answer.
426
+
427
+ ### Function Activity Diagnostics
428
+
429
+ Use `read.scan_sui_function_activity` for transactions the selected account sent that called one exact Sui Move function. Use `read.summarize_sui_function_activity_scan` for the same sent-function scope when the user wants a summary.
430
+
431
+ Rules:
432
+
433
+ - The `function` input must be a full `package::module::function` string.
434
+ - Do not pass package-only, package-and-module-only, generic/type-argument forms, or a bare function name.
435
+ - Describe the result as "transactions this account sent that called this function."
436
+ - Do not describe it as every affected transaction, every touched object, or complete dApp history.
437
+ - Empty results mean the bounded page returned no matching sent rows; they do not prove no matching activity exists.
438
+
439
+ Function activity facts are not route quality, P&L, wallet position inventory, transaction-building input, signing data, signing readiness, protocol support, or complete history.
440
+
441
+ When the user asks for balances for a specific Sui address, call `read.summarize_wallet_assets` or `read.classify_wallet_assets` with `account`. Do not start wallet connection for that public-address read.
442
+
443
+ If the user asks for their balances without giving an address, use `session.get_interaction_status.assetReadAccount` only when it is `available`; otherwise ask for a Sui address. Open a wallet connection card only when the user requests connection.
444
+
445
+ Explicit-address wallet asset reads are live read snapshots only. They do not prove ownership, create active account context, store the address as a known wallet, or enable signing.
446
+
447
+ Do not call stored Sui activity complete wallet history, P&L, balance history, complete gas history, portfolio analysis, tax data, or proof of ownership.
448
+
449
+ For account asset timeline questions:
450
+
451
+ - Use `read.get_account_asset_timeline` only for stored local account activity evidence.
452
+ - If the response status is `scan_needed`, explain that no stored account activity scan proves the requested range yet, and use `userAnswerUse.followUp.tool` or `scanNeeded.tool` before claiming a timeline.
453
+ - If the response status is `account_not_known`, say the explicit account is not a known local wallet in the activity store. Do not tell the user to run `read.scan_sui_account_activity` from that response unless `scanNeeded` or `userAnswerUse.followUp` is present.
454
+ - Use `netFlowBars` as observed raw integer token inflow/outflow bars only.
455
+ - Do not call `netFlowBars` held balances, current balances, wallet total value, complete wallet history, P&L, tax, or cost basis.
456
+ - `balanceStatus: "unavailable_no_balance_anchor"` means held-balance bars are not available. Say that explicitly if the user asks for balances over time.
457
+ - Use `usdcReferences` only as DeepBook USDC token-denominated candle references for supported USDC-quoted assets. State that USDC is not fiat USD and not a USDC/USD peg guarantee. Do not turn those references into portfolio value, P&L, tax, cost basis, route advice, or signing readiness.
458
+
459
+ If the user wants a time range, explain that the tool requests bounded recent-to-older pages and can continue page by page.
460
+
461
+ Do not claim a time window is complete unless `windowComplete: true`.
462
+
463
+ Do not call the page provider-verified coverage when `orderingVerified: false`.
464
+
465
+ When a review activity response has `lowSampleWarning: true`, do not infer a behavior pattern. Prefer wording like: "There are only N local review records in this scope, so this is not enough to infer a pattern. Here are the raw counts."
466
+
467
+ For `read.list_review_activity`, `dataScope.recordCount` is the full matching local review count. The returned `activities` array can be shorter when `truncated.activities: true`.
468
+
469
+ For `read.get_review_session_detail`, transition rows with `isNoOp: true` are repeated lifecycle observations where the stored status did not change. Mention them only as audit details; do not count them as extra funnel progress.
470
+
471
+ For local settings or local data management, call `settings.create_local_settings_session` and tell the user to open the returned settings URL in the same machine's system browser.
472
+
473
+ Do not call MCP tools to mutate settings directly; direct settings mutator tools are not exposed. Do not call clearing active account a wallet disconnect. Endpoint changes apply after MCP server restart.
474
+
475
+ ## User Vocabulary
476
+
477
+ Do not silently turn vague words into amounts.
478
+
479
+ | User phrase | Response |
480
+ | --- | --- |
481
+ | `a little`, `some`, `roughly` | Ask for an amount and offer examples such as `1 SUI` or `10 SUI`. |
482
+ | `half` | Explain that balance-relative swap amounts are unsupported. Ask for an explicit source amount; do not infer a spendable balance or request connection merely to calculate it. |
483
+ | `all`, `everything` | Explain that all-balance swap amounts are unsupported. Ask for an explicit source amount rather than promising a gas-reserve calculation. |
484
+ | Number only, such as `5` | Ask which unit the user means: SUI, another asset, or a USD-denominated amount. If they mean dollars or stablecoins, use settlement-asset-group evidence before asking for a specific token. |
485
+
486
+ ## Clarification Templates
487
+
488
+ - Amount: "What amount do you want to use? Examples: `1 SUI`, `10 SUI`, or `$10 worth`."
489
+ - Unit: "When you say `5`, do you mean 5 SUI, another asset amount, or $5 through the supported USD-denominated settlement asset group?"
490
+ - Balance-dependent amount: "Half, percentages and all-balance swaps are not supported. What explicit source amount would you like to review?"
491
+ - Unsupported action: "That action is not currently supported. I can help with supported Sui mainnet reads or DeepBook quotes instead."
492
+
493
+ ## Unsupported Redirects
494
+
495
+ | Request | Response pattern |
496
+ | --- | --- |
497
+ | "Is this transaction safe?" | Do not guarantee safety. Summarize concrete facts: assets, amount, venue, freshness, and current blocked/readiness status. |
498
+ | "Do you think I should buy this?" | Do not give investment advice. Offer price, liquidity, quote, and risk-input facts when supported. |
499
+ | "Tell me when the price drops." | Say alerts are unsupported. Offer a one-time price or quote check. |
500
+ | "Let's buy Bitcoin too." | Say this toolkit only exposes Sui mainnet surfaces. |
501
+ | "Am I connected? / Am I logged in?" | Read `session.get_interaction_status.connections` with `walletAvailability`. When unavailable, report that connection state cannot be confirmed. The stored active account is not proof of a connection or login. Do not say the user is connected to DeepBook or signed in. |
502
+ | "Show my balances over time." | Held-balance history and P&L are not tool surfaces. Use `read.get_account_asset_timeline` only for stored raw net-flow bars over a UTC range; if `balanceStatus` is `unavailable_no_balance_anchor`, say held balances are unavailable. `read.summarize_wallet_assets` returns a current snapshot at `fetchedAt`. |
503
+ | "How much profit did I make?" | Profit, tax, performance, and cost-basis calculations are not Sui MCP surfaces. Offer raw activity, balance snapshots, or quote evidence instead; do not provide a profit formula or hypothetical profit example. |
504
+ | "Can you calculate my profit if I bought 10 SUI for 10 USDC?" | An assumed acquisition price does not change the boundary. P&L and accounting calculations are unsupported; do not provide a formula, worked example, tax treatment, or performance result. |
505
+ | "Did my swap go through?" | If the swap was signed through a Sui MCP review session, use `session.get_review_status` or `session.wait_execution_result`: a `completed` request with `executionResult.chainReceipt` has a server-verified chain result. Read `executionResult.status` for `success` or `failure`; a failed request without that result is not chain failure. Offer Sui Explorer for the digest. For transactions signed outside a review session, use `read.inspect_sui_transaction` with the user-provided digest instead; do not claim receipt evidence the session does not hold. |
506
+ | "Show my transaction history." | Use `read.scan_sui_account_activity` only as a user-requested bounded scan. Explain the limit, continuation cursor, and `windowComplete` result. Do not call it complete wallet history. |
507
+ | "Cancel the transaction I just sent." | Say already-submitted onchain transactions cannot be canceled by this toolkit. |
508
+ | "Can I trust this address?" | Say address reputation lookup is unsupported. Use only verified mainnet protocol surfaces when preparing reviews. |
509
+
510
+ ## Comparisons
511
+
512
+ Only compare options when the user asks for a criterion such as cheaper, lower slippage, or less SUI spent.
513
+
514
+ State the checked scope and timestamp.
515
+
516
+ Avoid unqualified words such as best, recommended, guaranteed, or safe. Prefer: "Among checked options, at this quote time..."
517
+
518
+ ## Language
519
+
520
+ This reference document stays in English. Reply in the user's language. Translate response patterns as needed, but keep SDK names, tool names, object IDs, package IDs, and token symbols in their original form.
521
+
522
+ ## Golden Scenarios
523
+
524
+ Detailed expected response classes live in `docs/golden-scenarios/BEHAVIOR_MATRIX.md`. They are documentation for release review, not automated cross-client results.