server¶
gurume.server ¶
MCP Server for Tabelog restaurant search using FastMCP.
This module keeps the FastMCP instance and tool entrypoints together while delegating response schemas and helper logic to focused modules.
CourseOutput ¶
Bases: BaseModel
Structured course output.
CuisineListOutput ¶
Bases: BaseModel
Structured cuisine list output for MCP clients.
CuisineOutput ¶
Bases: BaseModel
Cuisine type output schema.
MenuItemOutput ¶
Bases: BaseModel
Structured menu item output.
RestaurantDetailOutput ¶
Bases: BaseModel
Structured restaurant detail output for MCP clients.
RestaurantOutput ¶
Bases: BaseModel
Restaurant search result output schema.
RestaurantSearchOutput ¶
Bases: BaseModel
Structured restaurant search output for MCP clients.
ReviewOutput ¶
Bases: BaseModel
Structured restaurant review output.
SearchFiltersOutput ¶
Bases: BaseModel
Normalized filters used for a search request.
SearchMetaOutput ¶
Bases: BaseModel
Pagination and result metadata for restaurant search.
SuggestionListOutput ¶
Bases: BaseModel
Structured suggestion list output for MCP clients.
SuggestionOutput ¶
Bases: BaseModel
Area or keyword suggestion output schema.
ToolErrorOutput ¶
Bases: BaseModel
Structured MCP tool error output for agent-friendly recovery.
run ¶
run(
transport: TransportType = "stdio",
host: str = "127.0.0.1",
port: int = 8000,
path: str = "/mcp",
) -> None
Synchronous entry point for CLI
This function is called when running 'gurume mcp' command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transport
|
TransportType
|
MCP transport to use ("stdio", "sse", or "streamable-http"). |
'stdio'
|
host
|
str
|
Bind host for HTTP transports (ignored for stdio). |
'127.0.0.1'
|
port
|
int
|
Bind port for HTTP transports (ignored for stdio). |
8000
|
path
|
str
|
HTTP mount path for the MCP endpoint (streamable-http uses
|
'/mcp'
|
Source code in src/gurume/server.py
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | |
tabelog_get_area_suggestions
async
¶
tabelog_get_area_suggestions(
query: Annotated[
str,
Field(
description="Area query in Japanese, hiragana, or romaji. Use this before searching when area names are ambiguous.",
min_length=1,
),
],
) -> SuggestionListOutput
Get area and station suggestions for validating user-provided locations.
Source code in src/gurume/server.py
516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 | |
tabelog_get_keyword_suggestions
async
¶
tabelog_get_keyword_suggestions(
query: Annotated[
str,
Field(
description="Keyword query in Japanese, hiragana, or romaji. Use this to detect Genre2 cuisines or restaurant-name suggestions before searching.",
min_length=1,
),
],
) -> SuggestionListOutput
Get keyword suggestions for cuisine names, restaurant names, and popular search variants.
Source code in src/gurume/server.py
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 | |
tabelog_get_restaurant_details
async
¶
tabelog_get_restaurant_details(
restaurant_url: Annotated[
str,
Field(
description="Tabelog restaurant URL from search results. Must start with https://tabelog.com/.",
pattern="^https://tabelog\\.com/.+",
),
],
fetch_reviews: Annotated[
bool,
Field(
default=True,
description="Whether to fetch review pages from Tabelog.",
),
] = True,
fetch_menu: Annotated[
bool,
Field(
default=True,
description="Whether to fetch the restaurant menu page.",
),
] = True,
fetch_courses: Annotated[
bool,
Field(
default=True,
description="Whether to fetch the restaurant course page.",
),
] = True,
max_review_pages: Annotated[
int,
Field(
default=1,
description="Maximum number of review pages to fetch when fetch_reviews is true.",
ge=1,
),
] = 1,
) -> RestaurantDetailOutput
Fetch detailed restaurant information including reviews, menu items, and courses.
Source code in src/gurume/server.py
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 | |
tabelog_list_cuisines
async
¶
tabelog_list_cuisines() -> CuisineListOutput
Get complete list of all 45+ supported Japanese cuisine types with their Tabelog genre codes.
WHEN TO USE:
- Before calling tabelog_search_restaurants with cuisine parameter to verify available options
- Providing cuisine type suggestions/autocomplete to users
- Validating user's cuisine input against supported types
- Building UI dropdown menus or selection lists
RETURN FORMAT: Returns list of all supported cuisines: - name: Cuisine name in Japanese (e.g., 'すき焼き', '焼肉', 'ラーメン') - code: Tabelog genre code (e.g., 'RC0107', 'RC0103') - used internally for filtering
CUISINE CATEGORIES (45+ types total): - Japanese: すき焼き, 焼肉, 寿司, ラーメン, うなぎ, そば, うどん, 天ぷら, とんかつ, 焼き鳥, お好み焼き, たこ焼き - Hotpot/Nabe: しゃぶしゃぶ, もつ鍋, 水炊き - Izakaya: 居酒屋, 焼酎バー, 日本酒バー - Western: イタリアン, フレンチ, スペイン料理, ハンバーガー, ステーキ - Asian: 中華料理, 韓国料理, タイ料理, インド料理, ベトナム料理 - Other: カレー, カフェ, スイーツ, パン, ラーメン
WORKFLOW EXAMPLE:
1. User asks: 'Find sukiyaki restaurants in Tokyo'
2. Call tabelog_list_cuisines to verify 'すき焼き' is supported → Returns {name: 'すき焼き', code: 'RC0107'}
3. Call tabelog_search_restaurants with area='東京', cuisine='すき焼き'
NO INPUT REQUIRED: This tool takes no parameters, simply call it to get the full list.
Returns:
| Type | Description |
|---|---|
CuisineListOutput
|
List of all supported cuisine types with their genre codes |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If cuisine list retrieval fails (should be rare as data is static) |
Source code in src/gurume/server.py
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 | |
tabelog_search_restaurants
async
¶
tabelog_search_restaurants(
area: Annotated[
str | None,
Field(
default=None,
description="Area name in Japanese. Prefer a validated prefecture, city, or station from `tabelog_get_area_suggestions`.",
min_length=1,
),
] = None,
keyword: Annotated[
str | None,
Field(
default=None,
description="General keyword for restaurant names or free-text matching. Use `cuisine` for cuisine-type searches.",
min_length=1,
),
] = None,
cuisine: Annotated[
str | None,
Field(
default=None,
description="Cuisine name in Japanese. Validate with `tabelog_get_keyword_suggestions` or `tabelog_list_cuisines` before searching.",
min_length=1,
),
] = None,
sort: Annotated[
SortOption,
Field(
default="ranking",
description="Result ordering: ranking, review-count, new-open, or standard.",
),
] = "ranking",
limit: Annotated[
int,
Field(
default=20,
description="Maximum number of restaurants to return from the first fetched page.",
ge=1,
le=60,
),
] = 20,
page: Annotated[
int,
Field(
default=1,
description="1-based result page to fetch from Tabelog. Use the returned metadata to continue paging.",
ge=1,
),
] = 1,
reservation_date: Annotated[
str | None,
Field(
default=None,
description="Reservation date in YYYYMMDD format. Must be used together with reservation_time.",
pattern="^\\d{8}$",
),
] = None,
reservation_time: Annotated[
str | None,
Field(
default=None,
description="Reservation time in 24-hour HHMM format. Must be used together with reservation_date.",
pattern="^\\d{4}$",
),
] = None,
party_size: Annotated[
int | None,
Field(
default=None,
description="Optional party size for reservation filtering.",
ge=1,
),
] = None,
) -> RestaurantSearchOutput
Search Tabelog restaurants with validated filters and pagination metadata.
Recommended workflow:
1. Validate ambiguous areas with tabelog_get_area_suggestions.
2. Validate cuisines or names with tabelog_get_keyword_suggestions.
3. Search using the normalized area and cuisine values.
4. Use page together with the returned meta.has_next_page and has_more fields to fetch later pages.
Returns a structured envelope with restaurants, applied filters, pagination metadata, and non-fatal warnings that help the caller refine follow-up tool calls.
Source code in src/gurume/server.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | |