Skip to main content
Glama

Pairing Guide

pairing_guide

Find beer and food pairings by searching a beer style or dish name. Get suggestions based on complement, contrast, and cleanse principles.

Instructions

Get beer and food pairing suggestions. Search by beer style or dish name. Returns pairing matches with complement, contrast, and cleanse principles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesBeer style or dish name to find pairings for

Implementation Reference

  • Import of registerPairingGuide from the pairing-guide module; registered on line 15.
    import { registerPairingGuide } from "./tools/pairing-guide.js";
  • Calls registerPairingGuide(server) to register the pairing_guide tool.
    registerPairingGuide(server);
  • The full implementation: registers the 'pairing_guide' tool on the MCP server. Uses fuzzySearch to search PAIRINGS data by style name and dish name, deduplicates results, and returns formatted text with pairing principles. Returns a 'no results' message if nothing found.
    export function registerPairingGuide(server: McpServer): void {
      server.registerTool(
        "pairing_guide",
        {
          title: "Pairing Guide",
          description:
            "Get beer and food pairing suggestions. Search by beer style or dish name. Returns pairing matches with complement, contrast, and cleanse principles.",
          inputSchema: {
            query: z
              .string()
              .describe("Beer style or dish name to find pairings for"),
          },
        },
        async ({ query }) => {
          // Search by style name
          let results = fuzzySearch(PAIRINGS, query, ["style"]);
    
          // Also search by dish text
          const byDish = fuzzySearch(PAIRINGS, query, ["dishes"]);
    
          // Merge, deduplicating
          const seen = new Set(results.map((r) => r.style));
          for (const p of byDish) {
            if (!seen.has(p.style)) {
              results.push(p);
              seen.add(p.style);
            }
          }
    
          if (results.length === 0) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `No pairing suggestions found for '${query}'. Try a beer style (e.g. 'IPA', 'Stout', 'Pilsner') or a food (e.g. 'steak', 'cheese', 'chocolate').`,
                },
              ],
            };
          }
    
          return {
            content: [
              {
                type: "text" as const,
                text: results.map(formatPairing).join("\n\n---\n\n"),
              },
            ],
          };
        },
      );
    }
  • Formats a single FoodPairing into markdown text: style heading, dishes, principles, and optional avoid list.
    function formatPairing(pairing: FoodPairing): string {
      const lines = [
        `## ${pairing.style}`,
        `Dishes: ${pairing.dishes.join(", ")}`,
        "",
        "Pairing principles:",
        ...pairing.principles.map((p) => `- ${p}`),
      ];
      if (pairing.avoid.length > 0) {
        lines.push("", `Avoid: ${pairing.avoid.join(", ")}`);
      }
      return lines.join("\n");
    }
  • Input schema for the tool: accepts a single 'query' string parameter (beer style or dish name to find pairings for).
    inputSchema: {
      query: z
        .string()
        .describe("Beer style or dish name to find pairings for"),
    },
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses that results include complement, contrast, and cleanse principles, but does not mention any side effects, permissions, or safety (though it's a read operation).

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

Conciseness5/5

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

Two sentences, front-loaded with purpose, no filler. Each sentence adds essential information.

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

Completeness5/5

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

For a simple tool with one parameter and no output schema, the description is sufficient. It explains input, output, and the three pairing principles.

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% with parameter description already stating 'Beer style or dish name'. The tool description adds little beyond that, though it mentions the three pairing principles not in the schema. Baseline of 3 applies due to high schema coverage.

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

Purpose5/5

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

Clear verb 'get' with specific resource 'beer and food pairing suggestions'. Defines input types (beer style or dish name) and output (pairing matches with principles). Distinguishes from sibling tools like search_styles.

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

Usage Guidelines4/5

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

Description clearly states the tool's purpose for finding pairings, implying when to use it. However, it does not explicitly mention when not to use it or provide alternatives among siblings.

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/gregario/brewers-almanack'

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