mcp-marmiton 1.3.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,6 +4,7 @@
4
4
  [![CI](https://github.com/smeet666/mcp-marmiton/actions/workflows/ci.yml/badge.svg)](https://github.com/smeet666/mcp-marmiton/actions/workflows/ci.yml)
5
5
  [![license](https://img.shields.io/npm/l/mcp-marmiton.svg)](./LICENSE)
6
6
  [![MCP Registry](https://img.shields.io/badge/MCP_Registry-listed-6E56CF)](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.smeet666/mcp-marmiton)
7
+ [![Glama](https://glama.ai/mcp/servers/smeet666/mcp-marmiton/badges/score.svg)](https://glama.ai/mcp/servers/smeet666/mcp-marmiton)
7
8
 
8
9
  An [MCP](https://modelcontextprotocol.io) server for [Marmiton](https://www.marmiton.org),
9
10
  the French recipe site. Search recipes, read their ingredients and steps, and
@@ -68,27 +69,74 @@ Asking a language model to divide a recipe by 1.5 tends to produce "2.4 eggs" an
68
69
  server does the arithmetic itself and, more importantly, **says what it could not
69
70
  compute**. Every ingredient comes back with a `scaling` flag:
70
71
 
71
- | Flag | Meaning | Example at factor 0.667 |
72
- | ---------- | ------------------------------------------------ | --------------------------------- |
73
- | `scaled` | Multiplied and rounded to a readable value. | `25 cl de lait` → `17 cl de lait` |
74
- | `rounded` | Multiplied, then rounded to something countable. | `3 oeufs` → `2 oeufs` |
75
- | `unscaled` | Left exactly as published. | `1 pincée de sel`, `coriandre` |
72
+ | Flag | Meaning | Example |
73
+ | ---------- | -------------------------------------------------- | ---------------------------------------- |
74
+ | `scaled` | The value is the product itself. | `3 oeufs` ×2 → `6 oeufs` |
75
+ | `rounded` | The value had to be moved to stay usable. | `25 cl de lait` ×0.667 → `17 cl de lait` |
76
+ | `unscaled` | Carries no quantity, so left exactly as published. | `sel`, `coriandre` |
77
+
78
+ A count reaches an exact product as readily as a mass does: one pinch multiplied
79
+ by six is six pinches, and that line is `scaled`. `rounded` is for a value that
80
+ landed somewhere the arithmetic did not put it, a half egg taken to a whole one
81
+ or 133.4 g written as 135 g.
76
82
 
77
83
  Two rules are enforced. Scaling a recipe **down never asks for more** than the
78
- original: half a sachet at factor 0.667 becomes a third of a sachet, never a whole
79
- one. And scaling never **silently drops** an ingredient by rounding it to zero,
80
- which is why small amounts come back as fractions.
84
+ original: half a sachet at factor 0.667 stays half a sachet, never a whole one.
85
+ And scaling never **silently drops** an ingredient by rounding it to zero, which
86
+ is why small amounts come back as fractions.
87
+
88
+ **A counted thing is divided by what it holds, not by what holds it.** A boîte de
89
+ tomates is poured and the rest kept, a sachet de sucre vanillé is split by eye, a
90
+ feuille de gélatine is cut with scissors, a branche de thym is broken in two: all
91
+ of those land on a half. Half an oeuf would have to be
92
+ beaten and weighed, which is not an amount a recipe asks for, so a count of oeufs,
93
+ jaunes or blancs d'oeufs lands on a whole number. A few things are decided by what
94
+ they are: a clou de girofle and a zeste are counted whole, a pot and a bouteille
95
+ hold enough for a quarter to be a portion, a gousse and a tranche are cut off
96
+ something larger and take a corner off in the same gesture, a blanc de poulet is
97
+ meat and halves, and a douzaine states a number of things rather than a measure
98
+ of them, so `2 douzaines d'escargots` at three quarters comes back as
99
+ `18 escargots`.
100
+
101
+ **A thing counted on its own is divided by the size of one against what a recipe
102
+ puts in.** Une crevette, une moule, une noisette, un grain de poivre, une baie de
103
+ genièvre, un anis étoilé is already a portion: a recipe counts twelve of them
104
+ and a smaller recipe puts one fewer in the pan, so they land on a whole number.
105
+ Un gigot, une baguette, un camembert, un ananas, un oignon, une pastèque, une
106
+ pintade, un poulet, un poireau sits at
107
+ the other end of that comparison, asked for by the one or the two and shared out
108
+ with a knife, so they go as far as the quarter. A cut carved off one of them
109
+ stops at the half, une cuisse and une aile being the portion the knife already
110
+ produced. Un jus stops at the half: half
111
+ the jus of a citron is taken by squeezing half the fruit, and a quarter of one
112
+ has to be poured out and measured back.
113
+
114
+ Approximate measures are quantities too. A pinch, a handful, a bouchon or a
115
+ ramequin has the size the cook gives it, and the recipe's proportion lives in how
116
+ many are asked for, so the count is multiplied in whole units: `une pincée de
117
+ bicarbonate de soude` from 6 servings to 25 comes back as `4 pincées de
118
+ bicarbonate de soude`, carrying a note. Nothing is ever
119
+ converted into grams or spoons, where published equivalences span a fourfold
120
+ range; an order of magnitude belongs in a note, never in the quantity.
81
121
 
82
122
  Ranges are read as one quantity: "2 à 3 gousses" doubled reads "4 à 6 gousses",
83
123
  and `amount` reports the upper bound, since that is what a cook buys.
84
124
 
85
- Each ingredient also carries `adjusted`, which says whether rounding actually
86
- moved the number. A line can be `rounded` and still land exactly, as three eggs
87
- doubled land on six, so read `adjusted` rather than the flag when what you want
88
- to know is whether a quantity was touched.
89
-
90
- Below a quarter there is nothing a kitchen can measure, so the amount is clamped
91
- up and **the line stops holding its share of the recipe**. Half a sachet of
125
+ A line that writes an article where a digit would go is read as one of the
126
+ measure that follows it: `un bouchon de rhum` scaled sixfold is
127
+ `6 bouchons de rhum`, and the note says which word the figure came from. A noun
128
+ sitting between the amount and the `de` that introduces what is measured names a
129
+ container or a gesture, which is how a measure the vocabulary has never met is
130
+ still read. An article before a bare countable thing, as in `un oignon`, leaves
131
+ the line as published.
132
+
133
+ Each ingredient also carries `adjusted`, which says whether rounding moved the
134
+ number away from the exact product.
135
+
136
+ A shrinking line keeps the smallest share still worth measuring: a knife takes an
137
+ oignon to a quarter, a boîte or a sachet goes to a half, an oeuf stops at one.
138
+ Under that floor the amount is clamped up and **the line stops holding its share
139
+ of the recipe**. Half a sachet of
92
140
  baking powder against three pots of flour comes out four times too strong that
93
141
  way, so the ingredient and the response both say it happened rather than leaving
94
142
  you to find out in the oven.
@@ -261,28 +309,64 @@ et « 0,67 pincée de sel », énoncés avec le même aplomb qu'un chiffre juste
261
309
  serveur fait le calcul lui-même et, surtout, **signale ce qu'il n'a pas pu
262
310
  calculer**. Chaque ingrédient porte un indicateur `scaling` :
263
311
 
264
- | Indicateur | Sens | Exemple au facteur 0,667 |
265
- | ---------- | ------------------------------------------------- | --------------------------------- |
266
- | `scaled` | Multiplié et arrondi à une valeur lisible. | `25 cl de lait` → `17 cl de lait` |
267
- | `rounded` | Multiplié, puis arrondi à une valeur dénombrable. | `3 oeufs` → `2 oeufs` |
268
- | `unscaled` | Laissé exactement tel que publié. | `1 pincée de sel`, `coriandre` |
312
+ | Indicateur | Sens | Exemple |
313
+ | ---------- | ---------------------------------------------------- | ---------------------------------------- |
314
+ | `scaled` | La valeur est le produit exact. | `3 oeufs` ×2 → `6 oeufs` |
315
+ | `rounded` | La valeur a dû être déplacée pour rester utilisable. | `25 cl de lait` ×0,667 → `17 cl de lait` |
316
+ | `unscaled` | Ne porte aucune quantité, laissé tel que publié. | `sel`, `coriandre` |
317
+
318
+ Un décompte tombe juste aussi bien qu'une masse : une pincée multipliée par six
319
+ fait six pincées, et cette ligne est `scaled`. `rounded` désigne une valeur posée
320
+ ailleurs que là où le calcul la mettait, un demi-œuf ramené à un œuf entier ou
321
+ 133,4 g écrits 135 g.
269
322
 
270
323
  Deux règles sont garanties. Réduire une recette **ne demande jamais davantage** que
271
- l'originale : un demi-sachet au facteur 0,667 devient un tiers de sachet, jamais un
324
+ l'originale : un demi-sachet au facteur 0,667 reste un demi-sachet, jamais un
272
325
  sachet entier. Et l'adaptation ne **supprime jamais** un ingrédient en l'arrondissant
273
326
  à zéro, d'où les fractions pour les petites quantités.
274
327
 
328
+ **Un dénombrable se divise selon son contenu, pas selon son emballage.** Une boîte
329
+ de tomates se verse et le reste se garde, un sachet de sucre vanillé se partage à
330
+ l'œil, une feuille de gélatine se coupe aux ciseaux, une branche de thym se casse
331
+ en deux : tous tombent sur une demie. Un demi-œuf, lui,
332
+ demanderait de le battre et de le peser, ce qu'aucune recette ne demande : un
333
+ nombre d'œufs, de jaunes ou de blancs d'œufs tombe sur un entier. Quelques cas se
334
+ décident sur la nature de la chose : un clou de girofle et un zeste se comptent
335
+ entiers, un pot et une bouteille en contiennent assez pour qu'un quart soit une
336
+ portion, une gousse et une tranche sont déjà taillées dans plus grand et la
337
+ planche leur reprend un coin du même geste, un blanc de poulet est une viande et
338
+ se coupe en deux, et une douzaine
339
+ énonce un nombre de choses plutôt qu'une mesure, si bien que
340
+ « 2 douzaines d'escargots » réduites d'un quart reviennent en « 18 escargots ».
341
+
342
+ Les mesures approximatives sont des quantités elles aussi. Une pincée, une
343
+ poignée, un bouchon ou un ramequin ont la taille que le cuisinier leur donne,
344
+ et la proportion de la recette tient au nombre demandé : ce nombre est donc
345
+ multiplié, en unités entières. « une pincée de bicarbonate de soude » de 6 à 25
346
+ parts revient en « 4 pincées de bicarbonate de soude », accompagnée d'une
347
+ note. Aucune conversion en grammes ni en cuillères : les
348
+ équivalences publiées varient du simple au quadruple, et un ordre de grandeur a
349
+ sa place dans une note, jamais dans la quantité.
350
+
275
351
  Les fourchettes sont lues comme une seule quantité : « 2 à 3 gousses » doublé
276
352
  donne « 4 à 6 gousses », et `amount` renvoie la borne haute, celle que l'on
277
353
  achète.
278
354
 
279
- Chaque ingrédient porte aussi `adjusted`, qui dit si l'arrondi a réellement
280
- déplacé le nombre. Une ligne peut être `rounded` et tomber juste, comme trois
281
- œufs doublés qui font six, donc lisez `adjusted` plutôt que l'indicateur quand
282
- la question est de savoir si une quantité a été touchée.
283
-
284
- Sous un quart, il n'y a plus rien qu'une cuisine puisse mesurer : la quantité est
285
- alors remontée et **la ligne cesse de tenir sa part de la recette**. Un demi-sachet
355
+ Une ligne qui écrit un article là où irait un chiffre est lue comme une unité de
356
+ la mesure qui suit : « un bouchon de rhum » multiplié par six donne « 6 bouchons
357
+ de rhum », et la note indique de quel mot vient le chiffre. Un nom placé entre la
358
+ quantité et le « de » qui introduit ce qui est mesuré désigne un contenant ou un
359
+ geste, ce qui permet de lire une mesure absente du vocabulaire. Un article devant
360
+ une chose dénombrable seule, comme « un oignon », laisse la ligne telle que
361
+ publiée.
362
+
363
+ Chaque ingrédient porte aussi `adjusted`, qui dit si l'arrondi a déplacé le
364
+ nombre par rapport au produit exact.
365
+
366
+ Une ligne qui rétrécit garde la plus petite part qui vaille encore la peine : le
367
+ couteau mène un oignon au quart, une boîte ou un sachet s'arrêtent à la demie, un
368
+ œuf s'arrête à l'unité. Sous ce plancher, la quantité est remontée et **la ligne
369
+ cesse de tenir sa part de la recette**. Un demi-sachet
286
370
  de levure face à trois pots de farine ressort ainsi quatre fois trop dosé, donc
287
371
  l'ingrédient et la réponse le disent, plutôt que de vous le laisser découvrir au
288
372
  four.