Kullanışlı Sonuçlar Döndürme
Modelin ve kullanıcının yararlanabileceği metni geri gönderin.
Kullanışlı Sonuçlar Döndürme, CoddyKit'te ücretsiz bir MCP Academy dersidir. Bu, 4 dersinin 3. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, MCP Academy öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. MCP Academy kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
The Result Goes Back to the Model
Whatever your tool returns is fed back to the AI as context, so it shapes the model's next answer to the user. 🔁
Return a String
The simplest useful result is a plain string. FastMCP wraps it as text content the model reads directly.
@mcp.tool()
def greet(name: str) -> str:
return "Hello, " + nameMake Text Self-Explaining
The model has no other context, so your text should explain itself. Return The total is 42, not just 42.
Numbers Are Stringified
If you return an int or float, FastMCP converts it to text for you, but adding a label makes the value clearer to the model.
@mcp.tool()
def add(a: int, b: int) -> int:
return a + bReturn Structured Data
Return a dict or list and FastMCP serializes it to JSON, giving the model clean, parseable fields instead of loose prose.
@mcp.tool()
def stats() -> dict:
return {"users": 12, "active": 9}Keep Results Concise
Every returned token costs the model context budget, so trim your result to what actually answers the request. Less noise, sharper replies.
Format for Reading
When a result has parts, a little structure helps. Short labeled lines beat one long sentence the model has to untangle.
Return Errors as Text
When something goes wrong, returning a clear message lets the model explain the problem and try a fix, instead of guessing.
if not city:
return "Error: city is required."Don't Return Secrets
The result reaches the model and often the user, so never include secrets like API keys or raw passwords in what you return.
Consistent Shapes Help
Return the same shape every call so the model learns what to expect. Surprises in structure lead to misread answers.
Match the Tool's Promise
Your result should deliver exactly what the description promised. If you said it returns the price, return the price, not a whole report.
Quick Check
What happens when your tool returns a Python dict?
Recap
Your result becomes the model's context: return clear, concise, self-explaining text or JSON, keep shapes consistent, and never leak secrets. ✅
Sıkça Sorulan Sorular
“Kullanışlı Sonuçlar Döndürme” dersi ücretsiz mi?
Evet — “Kullanışlı Sonuçlar Döndürme” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve MCP Academy kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. MCP Academy kursu toplamda 4 dersten oluşur.
“Kullanışlı Sonuçlar Döndürme” dersinde ne öğreneceğim?
Modelin ve kullanıcının yararlanabileceği metni geri gönderin. MCP Academy ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
MCP Academy öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te MCP Academy, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 3. dersidir.
“Kullanışlı Sonuçlar Döndürme” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu MCP Academy dersinde kod yazıp çalıştırabilir miyim?
Evet. Her MCP Academy dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- Bir Aracı İyi Adlandırma ve Açıklama
- Tür İpuçlarıyla Parametre Bildirme
- Kullanışlı Sonuçlar Döndürme
- Baştan Sona Hesap Makinesi Aracı