A full-stack application for PDF document analysis and question-answering using LangChain and OpenAI. Includes a React frontend with speech recognition and a Node.js/Express backend.
This server exposes two tools with minimal definition quality. The 'upload' tool has a basic description but lacks proper input schema documentation, the file parameter type is declared but not formally schematized. The 'chat' tool description is verbose (180+ chars) but omits critical details about prerequisites (file must be uploaded first), error cases, and output structure. Neither tool documents return schemas. Parameter descriptions are sparse. No error handling guidance. No tool annotations. This falls well below production baseline (194 char avg description, 100% of A+ tools have param descriptions).
Processes a question against an uploaded PDF document using LangChain's RetrievalQAChain. Loads the PDF, splits text into chunks, creates embeddings, and returns an answer based on document context.
Handles file upload via multipart form data. Stores uploaded files to disk and returns the file path.
No input schema documentation for 'upload' tool. File parameter type is declared as 'file' but lacks JSON Schema formalization (no type, format, or constraints visible in schema object).
No output schema documented for either tool. LLMs cannot infer what fields to expect from responses, breaking downstream tool chaining and forcing unstructured parsing.
'chat' tool lacks prerequisite documentation. Description does not state that a PDF must be uploaded first via 'upload' tool, forcing agents to discover this dependency through trial and error.
No error handling guidance. If PDF file is missing, malformed, or OpenAI API fails, the tool returns raw errors with no recovery hints. LLM cannot self-correct.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 37 | 2026-07-28+ | v2 |
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). 'upload' is destructive (writes to disk) but unmarked; 'chat' is read-only but unmarked. Agents cannot reason about side effects.