agentminds_connect
Send collected agent data to AgentMinds Central, then connect to receive automated recommendations for security, SEO, and performance improvements.
Instructions
Connect to AgentMinds Central — fully automatic.
CRITICAL RULES:
You MUST send your learned data FIRST before getting any recommendations
If this tool returns an error or "no_data", show ONLY the error message
DO NOT generate fake recommendations if the API fails or times out
DO NOT say "AgentMinds recommends..." unless you received real data from this tool
If you cannot reach the API, say "AgentMinds'a bağlanılamadı" — nothing else
If no key: register first, then push data, then get recommendations. If has key: push data → get recommendations.
Before calling this, collect DETAILED agent data from this project:
For each agent/module: what it does, its metrics, any issues found
Warnings and errors discovered
Patterns learned
Use agentminds_push to send detailed data FIRST, then connect for recommendations. The more data you send, the better recommendations you get.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | No | Site URL for registration (e.g. https://mysite.com). Only needed if auto-detection fails. | |
| brain_export_url | No | URL to pull brain data from (e.g. https://api.mysite.com/api/v1/brain/export). Optional. |
Implementation Reference
- server.js:325-357 (registration)Tool registration for agentminds_connect with name, description, and inputSchema
name: "agentminds_connect", description: `Connect to AgentMinds Central — fully automatic. CRITICAL RULES: 1. You MUST send your learned data FIRST before getting any recommendations 2. If this tool returns an error or "no_data", show ONLY the error message 3. DO NOT generate fake recommendations if the API fails or times out 4. DO NOT say "AgentMinds recommends..." unless you received real data from this tool 5. If you cannot reach the API, say "AgentMinds'a bağlanılamadı" — nothing else If no key: register first, then push data, then get recommendations. If has key: push data → get recommendations. Before calling this, collect DETAILED agent data from this project: - For each agent/module: what it does, its metrics, any issues found - Warnings and errors discovered - Patterns learned - Use agentminds_push to send detailed data FIRST, then connect for recommendations. The more data you send, the better recommendations you get.`, inputSchema: { type: "object", properties: { site_url: { type: "string", description: "Site URL for registration (e.g. https://mysite.com). Only needed if auto-detection fails.", }, brain_export_url: { type: "string", description: "URL to pull brain data from (e.g. https://api.mysite.com/api/v1/brain/export). Optional.", }, }, }, }, - server.js:489-619 (handler)Handler implementation for agentminds_connect — handles free scan (no key) and full connect (with key), calls API endpoints, processes responses, and formats results
case "agentminds_connect": { const lines = []; // STEP 1: No key → free scan first, then offer registration if (!API_KEY) { // Try to detect site URL const info = detectProjectInfo(); const siteUrl = args?.site_url || info.url; if (!siteUrl) { return { content: [{ type: "text", text: "# AgentMinds\n\nSite URL bulunamadı. Lütfen site_url parametresi ver (örn: https://mysite.com)\n\nYa da .env dosyasına SITE_URL=https://... ekle." }], }; } // Free scan — no registration needed lines.push("# AgentMinds — Ücretsiz Site Taraması\n"); lines.push(`Taranıyor: ${siteUrl}\n`); const scan = await httpPost("/api/v1/free-scan", { url: siteUrl }); if (scan.error) { lines.push(`Hata: ${scan.error}`); return { content: [{ type: "text", text: lines.join("\n") }] }; } lines.push(`## Sonuç: ${scan.grade} (${scan.overall_score}/100)\n`); lines.push(`Yanıt süresi: ${scan.performance?.response_time_ms || "?"}ms`); if (scan.tech?.length) lines.push(`Teknoloji: ${scan.tech.join(", ")}`); lines.push(""); // Security lines.push(`### Güvenlik (${scan.security?.score || 0}/100)\n`); for (const issue of (scan.security?.issues || [])) { lines.push(`- **[${issue.severity}]** ${issue.message}`); } lines.push(""); // SEO lines.push(`### SEO (${scan.seo?.score || 0}/100)\n`); for (const issue of (scan.seo?.issues || [])) { lines.push(`- **[${issue.severity}]** ${issue.message}`); } lines.push(""); // Locked features teaser const totalIssues = (scan.security?.issues?.length || 0) + (scan.seo?.issues?.length || 0); lines.push("---"); lines.push("### 🔒 Ücretsiz Kayıt ile Açılan Özellikler\n"); lines.push(`- **${totalIssues} sorun için hazır fix kodları** (kopyala-yapıştır)`); lines.push("- **200+ siteden kanıtlanmış çözümler** (cross-site zeka)"); lines.push("- **Her 6 saatte otomatik tarama** (sürekli izleme)"); lines.push("- **15 AI ajan** (Health, Security, Performance, SEO, Content, Quality...)"); lines.push("- **Benchmark** (benzer sitelerle karşılaştırma)"); lines.push("- **Trend analizi** (ne iyileşiyor, ne kötüleşiyor)"); lines.push("- **Proven playbook** (en etkili 20 fix)"); lines.push("- **Ajan güncelleme** (bilgi havuzundan pattern'ler öğren)"); lines.push("- **Kolektif zeka** (tüm sitelerin deneyiminden faydalanma)"); lines.push(""); lines.push("**Kayıt ol:** 'AgentMinds'a kayıt ol' de veya `agentminds_register` kullan. Ücretsiz."); return { content: [{ type: "text", text: lines.join("\n") }] }; } // STEP 2: Has key → full connect (push data + get recommendations) const data = await httpPost("/api/v1/connect", { brain_export_url: args?.brain_export_url || "", }); if (data.error === "no_data" || data.error === "no_patterns") { lines.push("# AgentMinds — Önce Verilerini Gönder!\n"); lines.push("**Kural: Önce ver, sonra al.** Veri göndermeden rapor alamazsın.\n"); lines.push("AgentMinds'tan öneri alabilmek için projedeki ajanların/modüllerin"); lines.push("detaylı verilerini gönder. Boş veri veya sadece isim/skor kabul EDİLMEZ.\n"); lines.push("## Ne Göndermelisin\n"); lines.push("Her ajan/modül için `agentminds_push` ile gönder:"); lines.push("1. **severity** — critical / warning / info"); lines.push("2. **summary** — ne yapıyor, durumu"); lines.push("3. **metrics** — önemli sayılar (gerçek rakamlar)"); lines.push("4. **warnings** — bulunan sorunlar"); lines.push("5. **memory.learned_patterns** — EN ÖNEMLİ: öğrendiği pattern'ler\n"); lines.push("**Veri kalitesi Grade B veya üstü olmalı. Grade F reddedilir.**\n"); lines.push("Şimdi projeyi tara, her modülün verisini topla ve `agentminds_push` ile gönder."); lines.push("Gönderdikten sonra tekrar `agentminds_connect` ile önerileri al."); return { content: [{ type: "text", text: lines.join("\n") }] }; } if (data.data_pushed) { lines.push(`# Veri Gönderildi\nAjanlar: ${data.data_pushed.agents || 0}, Pattern: ${data.data_pushed.patterns || 0}\n`); } if (data.processing_status === "running") { lines.push("⏳ **Sitenize özel analiz başlatıldı.** 5-10 dakika içinde tam öneri rehberi hazır olacak."); lines.push("Durumu kontrol etmek için tekrar 'AgentMinds'a bağlan' de.\n"); } else if (data.processing_status === "ready") { lines.push("✅ **Analiz tamamlandı!**\n"); } lines.push(formatActions(data)); // Show recommended agents/skills if available if (data.recommended_agents?.length) { lines.push("\n## Recommended Agents"); for (const a of data.recommended_agents.slice(0, 5)) { lines.push(`- **${a.agent}** [${a.priority}] — ${a.description || ''}`); } } if (data.recommended_skills?.length) { lines.push("\n## Recommended Skills"); for (const s of data.recommended_skills) { lines.push(`- **${s.skill}** [${s.priority}] — ${s.reason || ''}`); } } // CALL TO ACTION — this is a basic report, offer detailed analysis lines.push("\n---"); lines.push("## ⚡ Bu Basit Tarama Sonucudur\n"); lines.push("Bu rapor hızlı tarama ile oluşturuldu. **Detaylı analiz** için:"); lines.push("- Projedeki TÜM ajanların metriklerini, pattern'lerini, sorunlarını topla"); lines.push("- Skills, fonksiyonlar ve tech stack bilgisini gönder"); lines.push("- AgentMinds 2,500+ pattern havuzuyla karşılaştırıp KİŞİSEL öneri üretecek\n"); lines.push("**Detaylı rapor ister misiniz?** Eğer evet, projeyi derinlemesine tarayıp `agentminds_push` ile tüm verileri göndereceğim."); // Auto-feedback lines.push("\n---"); lines.push("**Feedback:** Bu önerileri projeye göre değerlendir ve feedback gönder:"); lines.push(`\`curl -s -X POST ${API_URL}/api/v1/feedback -H "X-AgentMinds-Key: ${API_KEY}" -H "Content-Type: application/json" -d '{"project_description":"...","site_type_correction":"..."}'\``); lines.push("Feedback göndermemi ister misin?"); return { content: [{ type: "text", text: lines.join("\n") }] }; } - server.js:269-310 (helper)formatActions helper used to format the action/recommendation data returned by agentminds_connect
function formatActions(data) { const lines = []; lines.push(`# AgentMinds — ${data.site_id || "Unknown"}`); lines.push(`Score: ${data.summary || "N/A"}`); lines.push(`Total actions: ${data.total_actions || 0}`); lines.push(""); if (data.actions?.critical?.length) { lines.push(`## CRITICAL (${data.actions.critical.length})`); for (const c of data.actions.critical) { lines.push(`- [${c.agent}] ${c.action}`); } lines.push(""); } if (data.actions?.warning?.length) { lines.push(`## WARNINGS (${data.actions.warning.length})`); for (const w of data.actions.warning) { lines.push(`- [${w.agent}] ${w.action}`); } lines.push(""); } if (data.actions?.recommendations?.length) { lines.push(`## RECOMMENDATIONS (${data.actions.recommendations.length})`); for (const r of data.actions.recommendations) { lines.push(`- [${r.priority || "?"}] [${r.agent}] ${r.action}`); } lines.push(""); } if (data.cross_site_tips?.length) { lines.push(`## CROSS-SITE TIPS (${data.cross_site_tips.length})`); for (const t of data.cross_site_tips) { lines.push(`- [${t.agent}] ${t.tip}`); lines.push(` How: ${t.how}`); } lines.push(""); } return lines.join("\n"); } - server.js:344-357 (schema)Input schema for agentminds_connect defining site_url and brain_export_url parameters
inputSchema: { type: "object", properties: { site_url: { type: "string", description: "Site URL for registration (e.g. https://mysite.com). Only needed if auto-detection fails.", }, brain_export_url: { type: "string", description: "URL to pull brain data from (e.g. https://api.mysite.com/api/v1/brain/export). Optional.", }, }, }, },