Skip to main content
Glama
worryzyy

HowToCook-MCP Server

by worryzyy

mcp_howtocook_getAllRecipes

Retrieve all available recipes from the HowToCook repository to assist with meal planning and recipe recommendations for AI-powered personal chefs.

Instructions

获取所有菜谱

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
no_paramNo无参数

Implementation Reference

  • The core handler function for the 'mcp_howtocook_getAllRecipes' tool. It maps over the recipes using simplifyRecipeNameOnly to create simplified versions and returns them as a formatted JSON string within a text content block.
    async () => { // 返回更简化版的菜谱数据,只包含name和description const simplifiedRecipes = recipes.map(simplifyRecipeNameOnly); return { content: [ { type: "text", text: JSON.stringify(simplifiedRecipes, null, 2), }, ], }; }
  • The Zod input schema definition for the tool, specifying an optional 'no_param' string parameter.
    { 'no_param': z.string().optional() .describe('无参数') },
  • The server.tool() call that registers the tool, including name, description, schema, and handler.
    server.tool( "mcp_howtocook_getAllRecipes", "获取所有菜谱", { 'no_param': z.string().optional() .describe('无参数') }, async () => { // 返回更简化版的菜谱数据,只包含name和description const simplifiedRecipes = recipes.map(simplifyRecipeNameOnly); return { content: [ { type: "text", text: JSON.stringify(simplifiedRecipes, null, 2), }, ], }; } );
  • src/index.ts:56-56 (registration)
    The call to registerGetAllRecipesTool during MCP server instance creation, which triggers the tool registration.
    registerGetAllRecipesTool(server, recipes);

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/worryzyy/HowToCook-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server