A medical procedure cost and recovery information chatbot using RAG (Retrieval-Augmented Generation) with Flask web interface and LangGraph examples
CareBridge exposes 12 tools with severe definition gaps. Most tools lack proper input schemas, parameters are documented in descriptions but not in structured JSON Schema format. Tool names are inconsistent (verb_noun for some, bare nouns for others). Descriptions exist but are often generic or incomplete. No output schemas documented. Error handling is absent. The server appears to be a Flask web app with RAG functionality, not a proper MCP server with tool registration.
Flask API endpoint that wraps ask.py's ask() function. Accepts a question and returns an answer.
Retrieves relevant procedure docs for a question, then asks Claude to answer using ONLY that retrieved context — and to name its source.
Chunks the procedure docs, embeds them, and loads them into a local Chroma vector store — this is the retrieval half of RAG.
Flask route serving the chat page
Split text into overlapping word-count chunks.
Computes percentage cheaper than the US, averaged across all procedures — computed from the same data the procedure cards show
No input schemas visible in source code. All 12 tools lack structured JSON Schema definitions with type constraints, required fields, and property descriptions. Parameters are documented only in prose descriptions.
No output schemas documented. Tools return data but LLMs cannot predict response structure. E.g., 'ask' returns an answer string, 'retrieve' returns documents, but no formal schema guides downstream tool composition.
Inconsistent naming conventions. 'ask', 'retrieve', 'render' are verbs; 'landing', 'chat_page' are nouns. 'build_index' and 'generate_docs' use verb_noun; 'demo_query' is ambiguous. LLMs struggle to infer intent from inconsistent patterns.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 26 | 2026-07-28+ | v2 |
Prints the top matches for a question — no LLM involved yet. This is purely to sanity-check that retrieval is finding the right docs.
Turns data/procedures.json into one plain-text document per procedure.
Flask route serving landing page with procedure list and savings statistics
Loads procedures from data/procedures.json
Renders a procedure dictionary into a formatted plain-text document
Queries the Chroma vector store to retrieve relevant procedure documents for a given question
Flask routes (landing, chat_page) exposed as tools. These are HTTP endpoints, not composable tools. They should not be in the tool list, they belong in the web layer, not the MCP interface.
No error handling or recovery guidance. Tools lack descriptions of failure modes, retryability, or what the LLM should do if a call fails. E.g., 'ask' may fail if the vector store is not built, but no guidance is provided.