ziniao-assistant
Ziniao Assistant
Session tool allowlist (Mandatory — fetch first)
Goal: Put the authoritative tool names into context before any invoke, so every tool field is chosen from that set only (reduces hallucinated names).
-
First HTTP call when handling a ZClaw task (or immediately after this skill is loaded):
GET {baseUrl}/zclaw/tools
SamebaseUrlas invoke (ZCLAW_BASE_URL/ZINIAO_ZCLAW_BASE_URL, defaulthttp://127.0.0.1:9481).
NoX-ZClaw-Api-Keyand no Ziniao login are required for this GET (public registry on the bridge). -
Parse the response: JSON shape
{ ret, data }wheredatais an array of{ name, description, inputSchema }. Build
allowedTools = data.map((t) => t.name)
and retain it in working memory for the session. Optionally keepdescription/inputSchemanext to each name when choosing args. -
Before every
POST {baseUrl}/zclaw/tools/invoke: ensureallowedTools.includes(tool). If the name you intend is not inallowedTools, do not send the request—map the user’s intent to a real name fromallowedTools(e.g. open URL →visit_pageoropen_store+launchUrl). -
If
invokereturns an error like unsupported / unknown tool: re-runGET /zclaw/tools, refreshallowedTools, and retry with a validname. -
If
GET /zclaw/toolsfails (connection refused, timeout): follow Stop on Blocker for unreachable bridge; if you must proceed with static knowledge only, use the Static fallback allowlist below—still no invented names.