{
  "name": "giphy_search",
  "description": "Search GIPHY for animated GIFs by words (\"celebration\", \"thinking cat\", \"mind blown\"), or list what is trending when no query is given. Prints one result per line — id, title, preview URL, size — in GIPHY's own order. The ids are what giphy_fetch takes. Needs GIPHY_API_KEY in the vault; the only host it opens is api.giphy.com.",
  "parameters": {
    "properties": {
      "query": {
        "type": "string",
        "description": "What the GIF should show, in plain words. Reactions and feelings work best: \"mind blown\", \"slow clap\", \"typing furiously\". Leave it out for what is trending."
      },
      "limit": {
        "type": "integer",
        "description": "How many results to print, 1-50. Default 12."
      },
      "rating": {
        "type": "string",
        "description": "Content rating ceiling: g, pg, pg-13 (default) or r. Use g for anything going in front of an audience you do not know."
      }
    },
    "required": []
  },
  "run": "NODE_BIN=\"$(command -v node || true)\"; if [ -z \"$NODE_BIN\" ]; then echo 'giphy_search: node not found on PATH' >&2; exit 2; fi; S=\"skills/giphy/tools/giphy_search/search.mjs\"; if [ ! -f \"$S\" ]; then echo 'giphy_search: search.mjs not found — this tool runs from an installed giphy skill folder (skills/giphy/)' >&2; exit 2; fi; exec \"$NODE_BIN\" \"$S\""
}
