mcpField
R
restaurant-search

restaurant-search

github.com/jackchukaその他15223 回インストール1 日前に更新
リポジトリ

restaurant-search について

`hpp`コマンドラインとHotPepper Gourmet APIで日本の飲食店を探すためのスキルです。場所、人数、料理ジャンル、予算、設備の希望を検索条件に整理し、結果を表にまとめます。

主な機能

  1. 01エリアとジャンルコードの解決
  2. 02場所または座標での検索
  3. 03予算と設備による絞り込み
  4. 04検索結果の表形式表示
  5. 05コマンドライン引数での再検索

活用シーン

  1. 01駅周辺の飲食店探し
  2. 02個室のある団体向け店舗探し
  3. 03料理ジャンルと価格帯での絞り込み

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/jackchuka/skills --skill restaurant-search

インストール後、Claude Code で/restaurant-searchを入力して読み込まれたか確認します。

詳細

Restaurant Search

Find Japanese restaurants using the hpp CLI (HotPepper Gourmet API). https://github.com/jackchuka/hpp

Prerequisites

  • hpp CLI installed and HOTPEPPER_API_KEY env var set

Workflow

1. Parse the request

Extract from the user's request:

  • Location: Station name, area name, or coordinates
  • Party size: Number of people (maps to --party-capacity)
  • Day/time: Determines which restaurants are open (check open/close fields)
  • Genre preference: e.g., izakaya, Chinese, Italian (maps to --genre)
  • Budget: Price range (maps to --budget)
  • Features: Private rooms (--private-room), non-smoking (--non-smoking), WiFi (--wifi), free drink (--free-drink), etc.
  • Keywords: Free text like "ramen", "sushi" (maps to --keyword)
2. Resolve the area code

The API requires area codes, not free-text location names. Resolve the location:

hpp area small --keyword "<location-name>"

This returns small area codes (e.g., X085 for 浜松町) along with parent middle/large area codes.

If no small area matches, try middle area:

hpp area middle --keyword "<location-name>"

If the user provides coordinates (lat/lng), skip area lookup and use --lat, --lng, --range instead.

3. Resolve genre codes (if needed)

If the user requests a specific cuisine type:

hpp genre

Common genre codes:

CodeGenre
G001居酒屋
G002ダイニングバー・バル
G003創作料理
G004和食
G005洋食
G006イタリアン・フレンチ
G007中華
G008焼肉・ホルモン
G009アジア・エスニック
G010各国料理
G011カラオケ・パーティ
G012バー・カクテル
G013ラーメン
G014カフェ・スイーツ
G016お好み焼き・もんじゃ
G017韓国料理

If unsure, run hpp genre to get the full list.

4. Resolve budget codes (if needed)

If the user specifies a budget:

hpp budget

Common budget codes:

CodeRange
B001~1500円
B0022001~3000円
B0033001~4000円
B0084001~5000円
B0045001~7000円
B0057001~10000円
B00610001~15000円
B01215001~20000円
B01320001~30000円
B01430001円~
5. Search restaurants

Build the hpp search command with resolved codes and flags:

hpp search --small-area <code> --party-capacity <N> --count 10

Key flags to apply based on user needs:

NeedFlag
Party size--party-capacity <N>
Genre--genre <code>
Budget--budget <code>
Private room--private-room
Non-smoking--non-smoking
WiFi--wifi
All-you-can-drink--free-drink
All-you-can-eat--free-food
English menu--english
Card payment--card
Late night (after 11pm)--midnight
Lunch--lunch
Keyword--keyword "<text>"
Coordinates--lat <lat> --lng <lng> --range <1-5>

Range values for coordinate search: 1=300m, 2=500m, 3=1km, 4=2km, 5=3km.

Always use JSON output (default) for parsing, then present results as a table.

6. 結果を表示する

結果は、次の列を含む Markdown テーブルで表示します。

ColumnSource
#行番号
店舗名name
ジャンルgenre.name
予算budget.average
アクセスaccess(駅名と徒歩時間を要約)
個室private_room(あり/なし/半個室)
営業時間open(該当する曜日のみ表示)
リンクurls.pc(クリック可能な Markdown リンク)

テーブルの後に、ユーザーの具体的なニーズに合ったおすすめを簡潔に紹介します(例:駅から最も近い、グループ向け、個室あり)。

7. 絞り込む(リクエストされた場合)

ユーザーが条件を絞り込みたい場合は、フラグを追加して再検索します。よく使う絞り込みは次のとおりです。

  • 「個室あり」→ --private-room を追加
  • 「4000円未満」→ --budget B001,B002,B003 を追加
  • 「禁煙」→ --non-smoking を追加
  • 「もっと表示して」→ --count を増やすか、ページネーションに --start を使用

その他の便利なコマンド

  • hpp shop --name "<name>" — 店舗名で特定の飲食店を検索
  • hpp special list — 特集・タグを確認
  • hpp creditcard — 利用可能なクレジットカードの種類を一覧表示

重要な注意事項

  • 結果数を制限するため、必ず --count を使用してください(デフォルトは 10、最大 100)。
  • API は日本語のテキストを返します。ユーザーから翻訳を求められない限り、そのまま提示してください。
  • 月曜日 = 月。open/close フィールドを確認して、指定された曜日に飲食店が営業しているか確認してください。
  • ユーザーが曜日を指定した場合は、定休日を確認するために close フィールドを確認してください(例:日 = 日曜日)。
  • クーポンのリンクは coupon_urls.sp で確認できます。ユーザーがクーポンについて尋ねた場合は、その旨を伝えてください。

コメント