Skip to main content
Glama
davidashman

AnyList MCP Server

by davidashman

Get Recipes

get_recipes

Retrieve saved recipes from AnyList with details like name, rating, cook time, prep time, and servings. Filter recipes by name using optional search to find specific dishes.

Instructions

List all saved recipes from the AnyList account. Returns name, rating, cook time, prep time, and servings for each recipe. Use the optional search parameter to filter by name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchNoOptional text to filter recipes by name (case-insensitive)

Implementation Reference

  • The handler logic for the 'get_recipes' tool, which fetches recipes from the AnyList client and filters them if a search term is provided.
    async ({ search }) => {
      try {
        const client = AnyListClient.getInstance();
        const recipes = await client.getRecipes();
    
        let filtered = recipes;
        if (search) {
          const term = search.toLowerCase();
          filtered = recipes.filter((r) => r.name?.toLowerCase().includes(term));
        }
    
        const summary = filtered.map((r) => ({
          id: r.identifier,
          name: r.name,
          rating: r.rating ?? null,
          cookTime: r.cookTime ?? null,
          prepTime: r.prepTime ?? null,
          servings: r.servings ?? null,
        }));
    
        return {
          content: [{ type: 'text', text: JSON.stringify(summary, null, 2) }],
        };
      } catch (error) {
        return {
          content: [{ type: 'text', text: `Error fetching recipes: ${error instanceof Error ? error.message : String(error)}` }],
          isError: true,
        };
      }
    },
  • The Zod schema defining the input parameters for the 'get_recipes' tool.
    inputSchema: z.object({
      search: z.string().optional().describe('Optional text to filter recipes by name (case-insensitive)'),
    }),
  • The registration of the 'get_recipes' tool within the MCP server.
    server.registerTool(
      'get_recipes',
      {
        title: 'Get Recipes',
        description:
          'List all saved recipes from the AnyList account. Returns name, rating, cook time, prep time, and servings for each recipe. Use the optional search parameter to filter by name.',
        inputSchema: z.object({
          search: z.string().optional().describe('Optional text to filter recipes by name (case-insensitive)'),
        }),
      },
Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosing what the tool returns, specifically listing the output fields (name, rating, cook time, etc.) to compensate for the missing output schema.

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?

Three well-structured sentences with zero waste: purpose declaration, return value disclosure, and parameter usage guidance. Information is front-loaded appropriately.

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?

For a low-complexity tool (1 optional parameter, no nesting), the description is complete. It adequately compensates for missing annotations and output schema by describing return values, though explicit differentiation from get_recipe_details would strengthen it further.

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?

With 100% schema coverage, the baseline is 3. The description mentions the optional search parameter but adds minimal semantic meaning beyond the schema's existing description of 'Optional text to filter recipes by name (case-insensitive)'.

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?

The description uses a specific verb ('List') and resource ('saved recipes from the AnyList account'), clearly distinguishing it from sibling tools like get_recipe_details (singular details) and get_lists (shopping lists).

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?

It provides implied usage by explaining the search parameter's purpose, but lacks explicit guidance on when to use this bulk listing tool versus get_recipe_details for detailed single-recipe retrieval.

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/davidashman/anylist-mcp'

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