add-mcp-tool
Installation
SKILL.md
Add an MCP tool
- API first: make sure the operation exists in
packages/rive/src/api.ts, takingdocfirst and accepting names or ids for references (usegetArtboard,getObject, …). ThrowApiErrorwith actionable messages. - Register in
apps/cli/src/mcp-server.tswith the localtool(name, description, zodShape, handler)helper:name: snake_case verb (add_gradient)description: one sentence saying what it does and when to use it- zod shape:
projectplus precise optional fields with.describe()text - handler:
edit(project, (doc) => api.fn(doc, args)), returning a compact result with an editor link
- Smoke test: extend
scripts/mcp-smoke.test.tsto call it, then runbun run test:mcp. - CLI (optional): add a matching command in
apps/cli/src/index.tsif it's useful from a terminal. - Document: add the tool to the table in
docs/mcp.mdand update the tool count there and inREADME.md. - If this work exposes a reproducible OpenRive defect outside the tool being added, follow
openrive-report-issueautomatically. Fix failures caused by the current change as part of the task instead of filing them as upstream bugs.