search_dental_topics
Search for common dental patient questions covering procedures, insurance, hygiene, costs, and conditions. Access information to understand the types of queries handled by Ravira's AI receptionist.
Instructions
Search for information about common dental topics that patients ask about.
Covers procedures, insurance, hygiene, costs, and common conditions. Useful for understanding the types of questions Ravira handles daily.
Args: topic: The dental topic to look up (e.g. "root canal", "whitening", "insurance", "braces", "implants", "cleaning", "emergency")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- server.py:322-448 (handler)The handler function for the search_dental_topics tool. Uses the @mcp.tool() decorator to register as an MCP tool. Accepts a topic string, looks it up in a hardcoded knowledge dictionary (cleaning, root canal, whitening, implant, emergency, insurance), and returns formatted info including common patient questions.
def search_dental_topics(topic: str) -> str: """ Search for information about common dental topics that patients ask about. Covers procedures, insurance, hygiene, costs, and common conditions. Useful for understanding the types of questions Ravira handles daily. Args: topic: The dental topic to look up (e.g. "root canal", "whitening", "insurance", "braces", "implants", "cleaning", "emergency") """ t = topic.lower() knowledge = { "cleaning": { "title": "Dental Cleaning (Prophylaxis)", "content": ( "A routine dental cleaning removes plaque and tartar from teeth. " "Recommended every 6 months. Cost: $75-$200 without insurance. " "Duration: 45-60 minutes. Includes: scaling, polishing, flossing, " "and a fluoride treatment." ), "patient_questions": [ "How much does a cleaning cost?", "How long does a cleaning take?", "Do I need X-rays at my cleaning?", "How often should I get a cleaning?", ], }, "root canal": { "title": "Root Canal Treatment (Endodontic Therapy)", "content": ( "A root canal removes infected pulp from inside a tooth to save it. " "Cost: $800-$1,500 depending on tooth location. Duration: 1-2 hours, " "sometimes requires 2 visits. Often covered 50-80% by insurance. " "Common misconception: modern root canals are no more painful than a filling." ), "patient_questions": [ "Does a root canal hurt?", "How much is a root canal?", "How long does a root canal take?", "Do I need a crown after a root canal?", ], }, "whitening": { "title": "Teeth Whitening", "content": ( "Professional teeth whitening lightens tooth color by 2-8 shades. " "In-office: $300-$800 (1 hour). Take-home trays: $200-$400. " "Results last 1-3 years with proper care. Not covered by insurance. " "Not recommended for crowns, veneers, or sensitive teeth without consultation." ), "patient_questions": [ "How much does teeth whitening cost?", "How long does whitening last?", "Is whitening covered by insurance?", "Is whitening safe?", ], }, "implant": { "title": "Dental Implants", "content": ( "A dental implant is a titanium post that replaces a missing tooth root. " "Full implant cost: $3,000-$5,000 per tooth (includes post, abutment, crown). " "Insurance often covers the crown portion only. " "Process takes 3-6 months total. Success rate: 95%+ with proper care." ), "patient_questions": [ "How much do implants cost?", "How long do implants last?", "Are implants covered by insurance?", "Am I a candidate for implants?", ], }, "emergency": { "title": "Dental Emergencies", "content": ( "Common dental emergencies: broken tooth, knocked-out tooth, severe toothache, " "lost filling or crown, dental abscess. " "Always call the dental office first — most keep same-day emergency slots. " "For knocked-out tooth: keep it moist (milk or saliva), see dentist within 1 hour. " "For facial swelling with difficulty breathing: go to ER immediately." ), "patient_questions": [ "I have a toothache — can I be seen today?", "My tooth broke — what do I do?", "I lost a filling — is that an emergency?", "My face is swelling — is that serious?", ], }, "insurance": { "title": "Dental Insurance Basics", "content": ( "Most dental plans cover: 100% preventive (cleanings, exams), " "80% basic (fillings, extractions), 50% major (crowns, root canals). " "Annual maximums typically $1,000-$2,000. " "Common accepted plans: Delta Dental, Aetna, Cigna, MetLife, Guardian, United Healthcare. " "Always verify in-network status before your visit." ), "patient_questions": [ "Do you accept my insurance?", "What does dental insurance cover?", "How much will my insurance pay?", "Do you offer payment plans?", ], }, } # Find the best matching topic for key, data in knowledge.items(): if key in t or t in key: questions = "\n".join(f" • {q}" for q in data["patient_questions"]) return ( f"# {data['title']}\n\n" f"{data['content']}\n\n" f"**Common patient questions Ravira handles:**\n{questions}\n\n" f"---\n" f"_Ravira answers these questions 24/7 using your practice's specific " f"knowledge base — so patients always get your accurate pricing and policies._" ) return ( f"Topic '{topic}' not found in the demo knowledge base.\n\n" f"Available topics: cleaning, root canal, whitening, implant, emergency, insurance\n\n" f"In a real Ravira deployment, the knowledge base is fully customized for each dental " f"practice — covering their specific services, prices, hours, staff, and policies." ) - server.py:323-331 (schema)Input schema defined in the docstring: `topic: str` parameter. No formal Pydantic schema, just the function signature and docstring which FastMCP uses to generate the JSON schema.
""" Search for information about common dental topics that patients ask about. Covers procedures, insurance, hygiene, costs, and common conditions. Useful for understanding the types of questions Ravira handles daily. Args: topic: The dental topic to look up (e.g. "root canal", "whitening", "insurance", "braces", "implants", "cleaning", "emergency") - server.py:321-322 (registration)Registration via the @mcp.tool() decorator on line 321, applied to FastMCP instance 'mcp' created on line 50.
@mcp.tool() def search_dental_topics(topic: str) -> str: