Files
accounted/extensions
Jakob Wennberg d012d40b18 feat(mcp): currency param on create_article and update_article (#1184)
Fixes #1168. articles.currency exists in the DB and REST API, but the
staged-operation schemas and the two MCP tools had no currency param,
so agent-created articles were always SEK and an agent asked to create
an EUR-priced article could not.

- CreateArticleParamsSchema/UpdateArticleParamsSchema accept an
  optional ISO 4217 code (normalized to upper case; empty/null =
  unset). The currencies-table FK stays the allow-list: a 23503 on the
  currency FK maps to a clear 400 instead of a raw 500.
- commitCreateArticle inserts currency ?? 'SEK'; the sparse update
  executor passes it through only when staged.
- gnubok_create_article / gnubok_update_article expose the param.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 12:59:32 +02:00
..