mcp-ptitchef

v1.1.0
io.github.smeet666/mcp-ptitchef Checked 4 days ago Published 1 month ago

Search Ptitchef recipes, read one, and rescale it to any servings.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_categories List the categories recipes are browsed by

List the categories Ptitchef browses its recipes by. Called without arguments it returns the families of ingredients; pass a family's slug as 'family' to list the categories it holds. Read this before building an address by hand: the site writes its slugs freely, so the same vegetable appears as 'chou-kale' on one line and as 'recette-de-petits-pois' on the next, and a slug that was guessed lands on a page the site does not hold. Each entry carries the slug to pass back and the page to open.

ParameterTypeDescription
familystringThe slug of a family to open, taken from a previous call. Leave it out to read the families themselves, which is where the tree starts.
limitintegerEntries to render, 20 by default and 200 at most. A level holding more than this says so, and 'categories_published' always states what the page listed.

search_recipes Search recipes

Search recipes on Ptitchef by dish or ingredient. The site answers in one of two ways and the answer says which: it either sends the search to a category page of its own, whose total counts what that category holds, or it answers on its own terms on a single page whose total is the number of rows served. When a category answered, 'topic_slug' names it and browse_recipes reads its further pages. Some topics come back as a guide the site wrote instead, grouped under headings of its own and carrying no total; browse_recipes on the same 'topic_slug' reads their full listing. A search the site matc…

ParameterTypeDescription
query *stringA dish or an ingredient, in French, as a reader of the site would type it.
limitintegerRows to render, 20 by default. 'rows_seen' states what the page served.

browse_recipes Browse a category or a standing list

Read the recipes under one category of Ptitchef, page by page, or one of the lists the site keeps standing. Pass 'category' with a slug from list_categories or from a search's 'topic_slug', or pass 'listing' for one of: latest, top_rated, most_viewed. Never build a category slug by hand: the site writes them freely and answers an address it does not hold by serving another page. The page in the answer is the one the site served. A page past the last one comes back either as the first page again or as not_found naming it past the last page.

ParameterTypeDescription
categorystringA category slug: one from list_categories whose 'is_family' is false, or the 'topic_slug' a search answered with. A family's slug belongs to list_categories instead.
limitintegerRows to render, 20 by default.
listingstringOne of the site's standing lists, read instead of a category.
pageintegerThe page of a category to read. A standing list has one page only.

search_by_ingredients Find recipes from the ingredients a cook has

Find Ptitchef recipes from the ingredients a cook already has. Give one to 5 ingredients in French, as a cook would name them ("poulet", "citron"). The site counts every recipe it finds and serves one page of them, so 'total_available' can be far larger than the rows returned, and the rest cannot be reached. A longer list than the site's own form reads is refused rather than sent and silently cut.

ParameterTypeDescription
ingredients *arrayOne to 5 ingredients, in French. The site reads no more than that.
limitintegerRows to render, 20 by default.

get_recipe Read one recipe

Read one Ptitchef recipe: its ingredients, method, times, rating, nutrition and the cost the site estimates for it. Pass the 'id' of a row from search_recipes, browse_recipes or search_by_ingredients. Give 'servings' to rescale the ingredients, and read each line's 'scaling' before quoting a quantity: 'scaled' is exact arithmetic, 'rounded' was moved to stay usable, and 'unscaled' carries nothing that could be multiplied. A time or a figure the site publishes none of comes back null, never zero.

ParameterTypeDescription
id *stringThe 'id' of a row from a search or a listing, which is the recipe's own page path.
servingsintegerRescale the ingredients to this many servings. Left out, the ingredients come back as published.

scale_ingredients Rescale an ingredient list

Rescale a list of ingredient lines to a different number of servings, without contacting any website. Give either 'factor' directly, or 'from_servings' and 'to_servings' and the factor is computed. Works on any French ingredient list, whatever its source, so it also serves a recipe pasted in by hand. Quantities in grams or millilitres are multiplied and rounded to readable values; a countable thing lands on a half when half of one can be poured, weighed or cut, as a boîte, a sachet, a feuille de gélatine or a cuillère can, and on a whole one when it cannot, as an oeuf, a jaune or a blanc; a…

ParameterTypeDescription
ingredients *arrayIngredient lines, for example ['200 g de farine', '3 oeufs', 'sel'].
factornumberMultiplier to apply. Use this or the from/to pair.
from_servingsnumberHow many servings the list is written for.
to_servingsnumberHow many servings are wanted.

get_recipe_translations Find a recipe in the other languages it was published in

List the other languages a Ptitchef recipe was published in, with the page of each. get_recipe already carries this list under 'translations', so call this one only where the rest of the recipe is not wanted. Pass the 'id' of a row from a search or a listing. The pairing is the site's own: each page names its counterparts, and this repeats those names rather than matching titles. How many there are belongs to the recipe: a recent one names more than twenty, from German to Hindi, and an older one names none. An empty list is what the site published, and the read succeeded.

ParameterTypeDescription
id *stringThe 'id' of a row from a search or a listing, which is the recipe's own page path.