{"name":"Nexus MCP Server","version":"0.1.0","protocol":"JSON-RPC 2.0","endpoint":"POST /api/mcp","tools":[{"name":"search_knowledge_base","description":"Semantic search over uploaded knowledge documents (pgvector cosine)."},{"name":"answer_question","description":"RAG Q&A: cosine retrieval plus JSON answer { text, markdown, sources[], version nexus.chat.v1 } (aliased as answer/citations)."},{"name":"generate_quiz","description":"Generate quiz-style questions from a document topic (adaptive-learning preview tool)."}],"chat_response_envelope":{"description":"POST /api/chat and tools that call it return nexus.chat.v1 JSON: { version, text, markdown, sources[], hallucination_flag, retrieved } plus legacy answer/citations aliases.","example_shape":{"version":"nexus.chat.v1","text":"Plain summary string","markdown":"## Heading\nUse **GFM**, tables, $x^2$ math, and inline [[S1]] markers that map to sources[0].","sources":[{"id":"chunk_cuid","index":1,"label":"Source 1","chunkIndex":0,"documentId":"doc_cuid","filename":"example.pdf","excerpt":"...","similarity":82}],"hallucination_flag":false,"retrieved":5}},"example_request":{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"answer_question","arguments":{"question":"What are the main concepts?"}}}}