Skip to main content
Glama

Look Up Cookbook

lookup_cookbook
Read-onlyIdempotent

Use this when you need a canonical pattern snippet for a CAD task. Search the kernelCAD cookbook for canonical pattern snippets. Returns top-k snippets matching the natural-language query, ranked by BM25 over title/tags/keywords/trigger. Use when you need a canonical pattern for fillet-after-subtract, non-overlapping booleans, sketch-to-extrude flows, etc. Returns empty if no snippet scores above the relevance floor — proceed without cookbook help in that case. Lookup responses include kernelSource: the exact kernel package version/revision, composed runtime source hash, and version-pinned public authoring/API references.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "lookup_cookbook"
  }
}

Input Schema

NameRequiredDescriptionDefault
kNoMax snippets to return. Default 3, max 5.
idNoExact snippet id as the skills cite it (e.g. "clearance-hole-through-plate"); returns that snippet. An unknown id is ranked as a query.
queryNoNatural-language description of what you want to do (e.g. "round the rim of a hole", "build an L-bracket"). One of query / id is required.
intentNoThe user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / id
      Added value: +{
      +  "description": "Exact snippet id as the skills cite it (e.g. \"clearance-hole-through-plate\"); returns that snippet. An unknown id is ranked as a query.",
      +  "type": "string"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Natural-language description of what you want to do (e.g. \"round the rim of a hole\", \"build an L-bracket\")."New value: +"Natural-language description of what you want to do (e.g. \"round the rim of a hole\", \"build an L-bracket\"). One of query / id is required."
    • removedInput schema / required
      Removed value: -[
      -  "query"
      -]
  2. Changed2 schema fields changed
    • removedOutput schema / properties
      Removed value: -{
      -  "error": {
      -    "type": "string"
      -  },
      -  "hits": {
      -    "description": "Top-k matching cookbook snippets, ranked by BM25.",
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "ok": {
      -    "type": "boolean"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "ok"
      -]
  3. Changed1 schema field changed
    • addedInput schema / properties / intent
      Added value: +{
      +  "description": "The user's request in one sentence, in the user's own words and language (e.g. 'M4 bracket for a 25 mm tube, print on Bambu A1'). Helps kernelCAD improve; leave out personal data.",
      +  "maxLength": 2000,
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "error": {
      +      "type": "string"
      +    },
      +    "hits": {
      +      "description": "Top-k matching cookbook snippets, ranked by BM25.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  5. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered; the description still adds real behavior: BM25 ranking, top-k truncation, a relevance floor that yields an empty result, and the presence of a kernelSource block with version/hash/reference pinning. It does not spell out result ordering ties or error conditions, keeping it below a 5.

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

Conciseness4/5

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

Front-loaded with the trigger and the core action, then progressively adds ranking, fallback behavior, and provenance. There is mild redundancy — 'canonical pattern snippet' and the 'use when you need a canonical pattern' idea appear three times — which keeps it from a 5.

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?

With an output schema present, the description needn't enumerate return fields, yet it still flags the kernelSource provenance payload and the empty-result case. Annotations cover the safety profile and the schema covers all four parameters, so nothing an agent needs in order to call this correctly is missing.

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%, so k, id, query and intent are all documented in the schema, including the unknown-id-is-treated-as-query rule. The description reinforces the natural-language nature of the query and the top-k cap but adds no syntax, format, or precedence detail beyond what the schema already carries, so baseline 3 applies.

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?

States a specific verb and resource: 'Search the kernelCAD cookbook for canonical pattern snippets,' with the retrieval mechanism (BM25 over title/tags/keywords/trigger) made explicit. It is clearly distinct from execute_cookbook or lookup_api by being a read-only snippet search, though it never names a sibling to contrast against.

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?

Gives a clear trigger ('when you need a canonical pattern snippet for a CAD task') plus concrete example cases (fillet-after-subtract, non-overlapping booleans, sketch-to-extrude) and an explicit fallback when results are empty. It stops short of naming alternatives such as execute_cookbook or lookup_authoring_skill, so it never says when NOT to use this.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.