Choose an access method
Connectors are one option, not a Mini App prerequisite, and a missing Connector doesn’t mean the data is unreachable. If the user names a method and it can be verified, use it; otherwise choose by available capabilities, authentication, runtime environment, and the operations you need.
Verify before you build
Before writing the package, run one read-only query against each data source with the chosen method. Confirm authorization, real parameters, response fields and types, and get a representative record or a real empty result. Write the parser from the shape you observed.A query that succeeds in the Agent’s terminal doesn’t prove it works in the Mini App runtime. CLI, API, and file access still need one real run inside the Node service.
Host Connector
The Node service uses connectors the user has authorized throughcontext.hostConnector. Third-party calls use the account the user authorized in MiniMax Code; the Mini App stores no credentials.miniapp/miniapp.json
- Declare only providers the runtime really needs and that you have verified.
list()is always available and returns the allowed tools with their input schemas. Usecall()only after the service is activated, from a request handler, never instart.- Don’t construct or store
toolRefvalues, and don’t send them to the page. List again after a process restart or a stale reference. - When the user signs out, the tool list and authorized references are revoked. After the same account signs in again, call
list()once more to recover, with no republish. If a different account signs in, old references are revoked for good.
Error handling
Branch oncode; don’t rely on instanceof across processes.disposition tells you whether the request went out: not_dispatched, provider_reported, or unknown_after_dispatch. For unknown_after_dispatch, read the business state to reconcile before deciding whether to retry a write.Decoding results
result.value is the third-party service’s raw result; the host doesn’t normalize it. The Skill’s host-connector-value.mjs unwraps the common single-text-block envelope and passes every other shape through unchanged. Zero parsed items count as success only when the service explicitly returned an empty result; if there is source data but nothing parses, treat it as a parse error, not as “no data”.State and persistence
- Keep runtime data in
context.dataDir, not in the workspace or the payload. - Route every write from the page, MCP calls, and Agent operations through one Node business service. Commit state before pushing SSE or WebSocket events so every open page refreshes to the latest data.