Save or replay a MosoFin skill
Additive-write path. Never persist a skill until the user has seen the results
and explicitly says yes again (a blanket "run it and save it" earlier in
the chat does not count). Full per-tool spec: docs/mcp-tool-spec.md.
Short contract: docs/plugin-contract.md.
Host-namespaced tool ids (Claude Code / Grok Build; plugin mosofin, server mosofin):
mcp__plugin_mosofin_mosofin__list_workspacesmcp__plugin_mosofin_mosofin__get_skillsmcp__plugin_mosofin_mosofin__get_my_skillmcp__plugin_mosofin_mosofin__create_skill
Do not call parked tools: update_skill, get_agents, or any goal-session
tool (start_goal, clarify_goal, generate_goal_brief, confirm_completion).
Native consent pickers may not appear. Ask in chat, then pass
confirmed="yes" only after an explicit yes.
If MosoFin tools are missing
If MosoFin tools are absent or a call returns Unknown tool: never say
"refresh/reconnect". Give ChatGPT/Codex setup: Settings → Apps & Connectors
→ create MosoFin at https://mcp.mosofin.com/mcp with OAuth → sign in → new
chat with MosoFin on. Claude Code / Grok Build: install mosofin@financehub.
Do not claim
a skill was saved.
Workspace first
If this chat has not confirmed a workspace, call list_workspaces and confirm
by name (workspace_ids + mode) before any skill tool. Use opaque ws_…
handles only.
Replay an existing skill
- Call
get_skillsfor the confirmed workspace. - Match by
name/description. If nothing matches, say so and stop (or send the user to/mosofin:query-workspaceto answer directly). - Present the candidate by name. Wait for an explicit yes. Never auto-replay.
- Only then call
get_my_skill(skill_id, confirmed="yes", workspace_id=…). The response inlinesskill_mdand the manifest; files markedcontent_omitted: trueneed a re-call withpaths=[…]andconfirmed="yes"again. - If
references/run-recipe.jsonexists, ask eachinputs[].askquestion verbatim — never silently default dates. For atype: "data_source"input, list companies bydisplay_name(via query-workspace) and pass the chosendata_source_idinto every step that has the"{data_source_id}"placeholder; a literal id in the recipe is pinned. - Execute steps in order (same
parallel_groupmay batch), substituting{workspace_id}and collected inputs. Replay data only via the query-workspace skill (invoke_datasource_api_tool), never by inventing numbers. - Ignore
dashboard_slug— it is legacy. Never route toshow_*tools.
Save a new skill
Prerequisites: a proven workflow already ran in this conversation (invoke results exist) and the user explicitly asked to save after seeing those results.
- Ask where to save:
mosofin(library),claude(bundle to install in this client), orboth. Do not default. - Call
create_skillwith:name— one verb + one financial object, kebab-case (reconcile-vendor-expenses), never a persona (finance assistant)description— ~100 words, "use when the user asks for …"destination— the choice from step 1confirmed—"yes"only after the post-results yesworkspace_id— confirmed opaque handledatasources— comma-separated ids actually invoked (required if the workflow calledinvoke_datasource_api_tool)files— JSON object string of the bundle. Must includeSKILL.mdat the root with YAML frontmatter. If the workflow read a datasource, also includereferences/run-recipe.json(one step per invoke, exact params,{workspace_id}placeholder, run-time date inputs declared). No.html/.css/.svg. Limits: ≤50 files, ≤1MB/file, ≤5MB total.
- If the tool refuses confirmation, ask again in chat and retry with
confirmed="yes". Do not setconfirmed="yes"without a fresh yes.
Notes:
namemust be ≥3 chars;description≥10 chars.- A
destinationincludingmosofinruns a blocking upload (up to ~45s). On failure nothing is saved — report the structured error; do not claim success. - If
claudeis among the destinations, the response includes aclaude_bundlefor local install — surface it to the user. - Report the saved skill by name and that a new version was created.
create_skill is additive: it creates a new retained version. It does not
overwrite an existing skill version.