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

View File

@@ -8,6 +8,9 @@ server {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires 0;
}
location /api/ {