Skip to main content
Glama
pepesto-solutions

Pepesto MCP Server

Official

Pepesto Suggest (search 1M+ recipes)

pepesto_suggest

Find recipes by free-text query with filters for cuisine, diet, ingredients, time, and servings. Returns full details including ingredients, steps, nutrition, and allergens.

Instructions

Search Pepesto's recipe graph (1M+ recipes) by free-text query and optional filters (cuisine, dietary tags, ingredients to include/avoid, time, servings). Each result includes a KgToken you can pass to pepesto_products. Returned images are licensed for display in your app or website without attribution. 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
queryYesFree-text query that may include cuisine, dietary tags, ingredients to include or avoid, time constraints, and servings, e.g. 'vegan keto dinner low on carb for two'.

Implementation Reference

  • The registerSuggestTool function registers the 'pepesto_suggest' tool. The handler (line 31: `async (args) => runTool(() => client.post('/suggest', args))`) executes the tool logic by POSTing to the /suggest endpoint via the PepestoClient.
    export function registerSuggestTool(server: McpServer, client: PepestoClient): void {
      server.registerTool(
        "pepesto_suggest",
        {
          title: "Pepesto Suggest (search 1M+ recipes)",
          description:
            "Search Pepesto's recipe graph (1M+ recipes) by free-text query and optional filters " +
            "(cuisine, dietary tags, ingredients to include/avoid, time, servings). Each result " +
            "includes a KgToken you can pass to pepesto_products. Returned images are licensed for " +
            "display in your app or website without attribution. 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: {
            query: z
              .string()
              .min(1)
              .describe(
                "Free-text query that may include cuisine, dietary tags, ingredients to include " +
                  "or avoid, time constraints, and servings, e.g. 'vegan keto dinner low on carb " +
                  "for two'.",
              ),
          },
        },
        async (args) => runTool(() => client.post("/suggest", args)),
  • Input schema for pepesto_suggest: a single required 'query' string (min length 1) for free-text recipe search.
    query: z
      .string()
      .min(1)
      .describe(
        "Free-text query that may include cuisine, dietary tags, ingredients to include " +
          "or avoid, time constraints, and servings, e.g. 'vegan keto dinner low on carb " +
          "for two'.",
      ),
  • src/server.ts:25-25 (registration)
    Registration call: registerSuggestTool(server, client) is invoked when creating the MCP server.
    registerSuggestTool(server, client);
  • The runTool helper wraps the API call, returning JSON-stringified content on success or an error object on failure.
    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 class with a post() method that handles authentication, HTTP POST requests, and error handling — used by the tool handler to call /suggest.
    export class PepestoClient {
      private readonly apiKey: string | undefined;
      private readonly baseUrl: string;
      private readonly fetchImpl: typeof fetch;
    
      constructor(opts: PepestoClientOptions = {}) {
        this.apiKey = opts.apiKey;
        this.baseUrl = (opts.baseUrl ?? "https://s.pepesto.com/api").replace(/\/+$/, "");
        this.fetchImpl = opts.fetchImpl ?? fetch;
      }
    
      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;
        }
      }
    }
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that images are licensed for display, that kg_token should be saved for the next step, and provides display instructions. However, it does not mention whether the operation is read-only, auth needs, or rate limits.

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

Conciseness3/5

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

The description is long and includes instructions for how to handle results, which could be more concise. It mixes tool functionality with behavioral instructions for the agent.

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

Completeness4/5

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

Given no output schema, the description explains what the output contains (title, image, ingredients, steps, nutrition, allergens, portions, kg_token) and provides instructions on not showing certain fields. It is fairly complete for a search tool but could be more structured.

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?

The input schema only has one parameter 'query' with a description that already mentions free-text. The tool description adds some extra context about cuisine, dietary tags, etc., but does not add substantial meaning beyond the schema. Schema coverage is 100%, so baseline 3 is appropriate.

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?

The description clearly states the tool searches Pepesto's recipe graph by free-text query and optional filters, and mentions it returns results with various details. However, it does not differentiate from siblings like pepesto_catalog or pepesto_oneshot.

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?

The description implies when to use (searching recipes with filters) and hints at a workflow using the returned KgToken for pepesto_products. But it lacks explicit guidance on when not to use or comparisons to sibling tools.

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