Skip to main content
Glama
pepesto-solutions

Pepesto MCP Server

Official

Pepesto Parse (recipe → structured ingredients)

pepesto_parse

Parse a recipe from a URL, free-form text, or image into structured ingredients, nutrition, and instructions for building a shopping cart.

Instructions

Parse a recipe from a URL, free-form text, or image into a structured object: title, ingredients, nutrition, instructions, and a KgToken you can pass to pepesto_products to build a real cart. Once the response is returned, show recipe title, image if available (json property image_url, don't search for external images, skip rendering the Pepesto image if the image has webp extesion), ingredients, steps, nutrition summary, allergens clearly marked, and portions/servings if available. Don't show kg_token, but mark and save it for the next steps (e.g., /products call).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recipe_urlNoPublicly crawlable recipe URL.
recipe_textNoFree-form recipe text.
recipe_imageNoBase64-encoded recipe image.
localeNoBCP 47 locale, e.g. 'en-GB', 'de-CH'.
generate_imageNoWhether to generate a shareable image of the recipe.

Implementation Reference

  • Registers the 'pepesto_parse' tool with the MCP server, including its name, description, and input schema.
    export function registerParseTool(server: McpServer, client: PepestoClient): void {
      server.registerTool(
        "pepesto_parse",
        {
          title: "Pepesto Parse (recipe → structured ingredients)",
          description:
            "Parse a recipe from a URL, free-form text, or image into a structured object: title, " +
            "ingredients, nutrition, instructions, and a KgToken you can pass to pepesto_products to " +
            "build a real cart. Once the response is returned, show recipe title, " +
            "image if available (json property `image_url`, don't search for external images, " +
            "skip rendering the Pepesto image if the image has webp extesion), " +
            "ingredients, steps, nutrition summary, allergens clearly marked, and portions/servings if available. " + 
            "Don't show kg_token, but mark and save it for the next steps (e.g., /products call).",
          inputSchema: {
            recipe_url: z
              .string()
              .url()
              .optional()
              .describe("Publicly crawlable recipe URL."),
            recipe_text: z
              .string()
              .optional()
              .describe("Free-form recipe text."),
            recipe_image: z
              .string()
              .optional()
              .describe("Base64-encoded recipe image."),
            locale: z
              .string()
              .optional()
              .describe("BCP 47 locale, e.g. 'en-GB', 'de-CH'."),
            generate_image: z
              .boolean()
              .optional()
              .describe("Whether to generate a shareable image of the recipe."),
          },
        },
        async (args) => runTool(() => client.post("/parse", args)),
      );
    }
  • Input schema for pepesto_parse: accepts optional recipe_url (URL), recipe_text (free text), recipe_image (base64), locale (BCP 47), and generate_image (boolean).
    inputSchema: {
      recipe_url: z
        .string()
        .url()
        .optional()
        .describe("Publicly crawlable recipe URL."),
      recipe_text: z
        .string()
        .optional()
        .describe("Free-form recipe text."),
      recipe_image: z
        .string()
        .optional()
        .describe("Base64-encoded recipe image."),
      locale: z
        .string()
        .optional()
        .describe("BCP 47 locale, e.g. 'en-GB', 'de-CH'."),
      generate_image: z
        .boolean()
        .optional()
        .describe("Whether to generate a shareable image of the recipe."),
    },
  • Handler that POSTs the validated arguments to the /parse endpoint via the PepestoClient.
      async (args) => runTool(() => client.post("/parse", args)),
    );
  • Helper utility that wraps tool execution, serializing success results as JSON and catching errors (including PepestoApiError) into error responses.
    export async function runTool(fn: () => Promise<unknown>): Promise<ToolResult> {
      try {
        const result = await fn();
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
        };
      } catch (err) {
        const msg =
          err instanceof PepestoApiError
            ? err.message
            : err instanceof Error
            ? `Error: ${err.message}`
            : `Error: ${String(err)}`;
        return {
          content: [{ type: "text", text: msg }],
          isError: true,
        };
      }
    }
  • PepestoClient.post() performs the actual HTTP POST to the Pepesto API, used by the tool handler to call /parse.
      async post<T = unknown>(endpoint: string, body: unknown): Promise<T> {
        if (!this.apiKey) {
          throw new Error(
            "PEPESTO_API_KEY is not set. See the README (\"Getting an API key\") for how to " +
              "obtain one.",
          );
        }
        const path = endpoint.startsWith("/") ? endpoint : `/${endpoint}`;
        const url = `${this.baseUrl}${path}`;
    
        const headers: Record<string, string> = {
          "Content-Type": "application/json",
          Accept: "application/json",
          Authorization: `Bearer ${this.apiKey}`,
        };
    
        const res = await this.fetchImpl(url, {
          method: "POST",
          headers,
          body: JSON.stringify(body ?? {}),
        });
    
        const text = await res.text();
        if (!res.ok) {
          throw new PepestoApiError(res.status, path, text);
        }
        if (!text) {
          return {} as T;
        }
        try {
          return JSON.parse(text) as T;
        } catch {
          return text as unknown as T;
        }
      }
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; description gives response handling instructions but does not disclose behavioral traits like authorization, rate limits, or error scenarios.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is verbose and includes agent instructions (show/hide fields) that could be separate; not concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Explains output fields and KgToken but lacks detail on when to use each input type and does not cover return structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%; description adds context linking input types to output but does not detail each parameter's usage comprehensively.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states verb 'Parse' and resource 'recipe', and enumerates output fields. However, no explicit differentiation from sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Describes what to do after parsing (show fields, save kg_token) but lacks guidance on when to use this tool vs alternatives or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/pepesto-solutions/pepesto-mcp'

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