Skip to content

Implement query_festival MCP tool #7

@AngusHsu

Description

@AngusHsu

Description

Create the query_festival tool handler at src/tools/query-festival.ts and register it in the server.

Tool specification

  • Name: query_festival
  • Description: Query Chinese festival data by name, date, or tag
  • Input schema (zod):
    • query (optional string) — search by festival name (Chinese or English, fuzzy match)
    • month (optional number) — filter by lunar month
    • day (optional number) — filter by lunar day
    • tag (optional string) — filter by tag
  • Output: Matching festival(s) with full details (description, offerings, rituals, images)

Search behavior

  • Name search: case-insensitive, partial match for both zh and en names
  • Date search: exact match on lunar month/day
  • Tag search: exact match on tag
  • Multiple filters: AND logic
  • No filters: return all festivals

Depends on

Acceptance Criteria

  • src/tools/query-festival.ts exports tool handler
  • Tool registered in MCP server
  • Searching by name returns correct results
  • Searching by date returns correct results
  • Searching by tag returns correct results
  • No match returns empty with helpful message
  • Build passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions