feat: integrate MCP servers as tools in Chat Agent with function calling

Add MCP tool discovery (auto + manual), tool execution via MCP SDK,
and GenAI function calling loop (Cohere + Generic formats) so the
chat agent can invoke MCP server tools during conversations.

- Add mcp SDK dependency
- New endpoints: discover-tools, update tools
- Modify _call_genai to support tools/tool_results and return (text, tool_calls)
- Tool use loop in chat endpoint (max 5 iterations)
- Frontend: tools management in MCP cards, chat toggle, tools_used display
- Multi-table ADB vector search, enriched embeddings, preview chunks
- Orphaned report cleanup on container restart
- Nginx no-cache headers, searchable dropdowns, editable vector tables
This commit is contained in:
nogueiraguh
2026-03-04 23:15:27 -03:00
parent 7448f98ce0
commit 0f5c805601
5 changed files with 2309 additions and 253 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -5,3 +5,4 @@ PyJWT==2.9.0
python-dotenv==1.0.1
oci==2.133.0
oracledb==2.4.1
mcp>=1.0.0