<feed xmlns='http://www.w3.org/2005/Atom'>
<title>food/kitchen/views.py, branch mcp-api</title>
<subtitle>Meal planning system (Django)</subtitle>
<id>https://git.tomflux.xyz/food/atom?h=mcp-api</id>
<link rel='self' href='https://git.tomflux.xyz/food/atom?h=mcp-api'/>
<link rel='alternate' type='text/html' href='https://git.tomflux.xyz/food/'/>
<updated>2026-06-23T20:24:09+00:00</updated>
<entry>
<title>Fix bulk-pantry-add crash on null unit (found in live MCP testing)</title>
<updated>2026-06-23T20:24:09+00:00</updated>
<author>
<name>Tom Flux</name>
<email>tom@tomflux.xyz</email>
</author>
<published>2026-06-23T20:24:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tomflux.xyz/food/commit/?id=eeeb1c5b34c058f2c1a7ea2f3c6b179f503d2aa4'/>
<id>urn:sha1:eeeb1c5b34c058f2c1a7ea2f3c6b179f503d2aa4</id>
<content type='text'>
End-to-end testing (MCP client -&gt; FastMCP -&gt; Django) surfaced a 500:
adding an item with an explicit `unit: null` (as add_to_pantry sends
for items without a unit) hit a NOT NULL violation, because
`item_data.get("unit", "items")` returns None when the key is present.

- views.bulk_pantry_add: `item_data.get("unit") or "items"` — tolerate
  null/empty unit.
- mcp_server add_to_pantry: omit quantity/unit from the payload when
  unset, so the API applies its own defaults.
- test: bulk-add with unit/quantity = null returns 201 (25 pass).

Co-Authored-By: Claude Opus 4.8 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Phase 3a: close the Django API gaps for the MCP server</title>
<updated>2026-06-23T20:07:18+00:00</updated>
<author>
<name>Tom Flux</name>
<email>tom@tomflux.xyz</email>
</author>
<published>2026-06-23T20:07:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tomflux.xyz/food/commit/?id=d118726d3010d5b0133c7665fc20008c055f2757'/>
<id>urn:sha1:d118726d3010d5b0133c7665fc20008c055f2757</id>
<content type='text'>
Backend prerequisites for the FastMCP service (mcp.md §6) — no model
changes, no migration.

- log_cook: accepts `rating`, validates via full_clean (enforces the
  exactly-one-recipe rule), and returns `used_ingredients` as a
  suggestion set instead of mutating the pantry. Auto-deduct path and
  _deduct_ingredient removed — pantry state changes only via set-state
  after the user confirms.
- New POST /api/pantry/set-state/ — set in/low/out by ingredient name
  (alias-aware), optional location; registered before the router so the
  pantry detail route doesn't capture "set-state" as a pk.
- what_can_i_cook: presence-based (exclude 'out', tolerate null
  quantity) so the API matcher agrees with the web one.
- bulk-pantry-add: restocks an existing ingredient+location row to 'in'
  instead of duplicating; quantity is an optional int.

Tests cover all four + that pantry `state` is serialized (24 pass).

Co-Authored-By: Claude Opus 4.8 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Simplify from claude</title>
<updated>2026-06-22T21:50:48+00:00</updated>
<author>
<name>Tom Flux</name>
<email>tom@tomflux.xyz</email>
</author>
<published>2026-06-22T21:50:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tomflux.xyz/food/commit/?id=cdbfabf0ea855df854b2357dc124df03f18d0514'/>
<id>urn:sha1:cdbfabf0ea855df854b2357dc124df03f18d0514</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add create-meta-recipe endpoint with nested slots/options/bases</title>
<updated>2026-04-02T16:51:12+00:00</updated>
<author>
<name>Caine</name>
<email>caine@jihakuz.xyz</email>
</author>
<published>2026-04-02T16:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tomflux.xyz/food/commit/?id=078f30476657d234270bd774c43429fe1aeffc05'/>
<id>urn:sha1:078f30476657d234270bd774c43429fe1aeffc05</id>
<content type='text'>
- POST /api/create-meta-recipe/ creates full meta-recipe in one call
- PUT /api/create-meta-recipe/ updates existing (requires id)
- Auto-resolves ingredients by name/alias, creates new if not found
- Returns full nested response with _created_ingredients list
- New writable serializers: MetaRecipeWriteSerializer, SlotWriteSerializer, etc.
</content>
</entry>
<entry>
<title>Phase 2+3: bulk pantry add, smart shopping list, recipe URL import</title>
<updated>2026-04-02T15:50:56+00:00</updated>
<author>
<name>Caine</name>
<email>caine@jihakuz.xyz</email>
</author>
<published>2026-04-02T15:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tomflux.xyz/food/commit/?id=27f91fb877f4502804c932a28546ab6c745cc103'/>
<id>urn:sha1:27f91fb877f4502804c932a28546ab6c745cc103</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add API: URLs, token auth, what-can-i-cook endpoint, log-cook with pantry deduction, browsable API</title>
<updated>2026-04-02T15:33:31+00:00</updated>
<author>
<name>Caine</name>
<email>caine@jihakuz.xyz</email>
</author>
<published>2026-04-02T15:33:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tomflux.xyz/food/commit/?id=fe00286f7558d379d392f8a46d10a4689f95d472'/>
<id>urn:sha1:fe00286f7558d379d392f8a46d10a4689f95d472</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add DRF serializers, viewsets, what-can-i-cook endpoint, log-cook with pantry deduction</title>
<updated>2026-04-02T15:32:00+00:00</updated>
<author>
<name>Caine</name>
<email>caine@jihakuz.xyz</email>
</author>
<published>2026-04-02T15:32:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tomflux.xyz/food/commit/?id=487bf469795d70fb2bfdbee882d00f0c5e726a9a'/>
<id>urn:sha1:487bf469795d70fb2bfdbee882d00f0c5e726a9a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Configure settings: add kitchen app, DRF, timezone, allowed hosts</title>
<updated>2026-04-01T21:48:28+00:00</updated>
<author>
<name>Caine</name>
<email>caine@jihakuz.xyz</email>
</author>
<published>2026-04-01T21:48:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tomflux.xyz/food/commit/?id=5c6f7ead8f23ac76d6650858d1e06d4afb6a2efe'/>
<id>urn:sha1:5c6f7ead8f23ac76d6650858d1e06d4afb6a2efe</id>
<content type='text'>
</content>
</entry>
</feed>
