{
  "name": "kitbitz_search",
  "description": "Search the local Kitbitz mirror for hand-drawn CC0 illustrations by words — an object (\"cart\", \"lantern\", \"pine tree\"), a mood or a scene — optionally inside one of the thirteen kits. Prints the asset ids that kitbitz_fetch takes. Entirely offline: no query ever leaves the machine. Needs kitbitz_sync to have run once.",
  "parameters": {
    "properties": {
      "query": {
        "type": "string",
        "description": "What you are looking for, in plain words. The catalog is tagged by object, so nouns work best: \"market cart\", \"neon sign\", \"pine tree\". Leave it out to list a whole kit."
      },
      "kit": {
        "type": "string",
        "description": "Limit to one kit: barbieland, city, cyberpunk, dungeon, halloween, interior, medieval, nature, pirate, ruins, space, western, winter. Pass this once a scene has a style, so every drawing matches the others."
      },
      "limit": {
        "type": "integer",
        "description": "How many hits to print, 1-60. Default 12."
      },
      "variants": {
        "type": "boolean",
        "description": "Include near-identical variants of the same object (five crates rather than one). Off by default; turn it on when the first pick is nearly right and you want its siblings."
      }
    },
    "required": []
  },
  "run": "NODE_BIN=\"$(command -v node || true)\"; if [ -z \"$NODE_BIN\" ]; then echo 'kitbitz_search: node not found on PATH' >&2; exit 2; fi; S=\"skills/kitbitz/tools/kitbitz_search/search.mjs\"; if [ ! -f \"$S\" ]; then echo 'kitbitz_search: search.mjs not found — this tool runs from an installed kitbitz skill folder (skills/kitbitz/)' >&2; exit 2; fi; exec \"$NODE_BIN\" \"$S\""
}
