0Pricing
MCP Academy · Ders

Görüntü ve İkili Veri Döndürme

Metin olmayan içeriği bir araç üzerinden geri gönderin.

Görüntü ve İkili Veri Döndürme, CoddyKit'te ücretsiz bir MCP Academy dersidir. Bu, 4 dersinin 4. 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.

Beyond Text and JSON

Some tools produce pictures or files, not words. MCP can return binary content like images and other blobs, not just text.

The Image Content Type

MCP defines an image content type carrying the raw bytes plus a media type. Clients that support it can render the picture directly. 🖼️

Bytes Travel as Base64

Binary data is encoded as base64 text so it survives the JSON message. The client decodes it back into real bytes on arrival.

The Image Helper

The Python SDK offers an Image helper so you do not hand-encode anything. You point it at bytes or a path and return it.

from mcp.server.fastmcp import Image

return Image(data=png_bytes, format="png")

Set the Media Type

Always state the format, like png or jpeg, so the client knows how to decode and display the image correctly.

Returning a File on Disk

Read the file into bytes, then wrap it for return. The tool turns a saved chart into a viewable result for the model and user.

data = open("chart.png", "rb").read()
return Image(data=data, format="png")

Not Only Images

Beyond pictures, MCP supports generic blob content for other binary data, like a PDF or audio, with its own media type.

Client Support Varies

Not every client can show every type. A host that cannot render an image may fall back to a reference or a download link.

Watch the Size

Base64 inflates data by about a third, and large blobs eat tokens and bandwidth. Keep returned media small when you can.

Prefer Resources for Big Files

For very large or shared files, expose a resource by URI instead of inlining bytes in a tool result. The client fetches on demand.

Combine With Text

You can pair an image with a short text caption in the same result, giving the model both a picture and words to reason about.

Quick Check

How does binary data ride inside an MCP message?

Recap: Images & Blobs

You can return images and binary blobs via base64 with a media type, set the format, mind size, and prefer resources for big files. ✅

Sıkça Sorulan Sorular

“Görüntü ve İkili Veri Döndürme” dersi ücretsiz mi?

Evet — “Görüntü ve İkili Veri 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.

“Görüntü ve İkili Veri Döndürme” dersinde ne öğreneceğim?

Metin olmayan içeriği bir araç üzerinden 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 4. dersidir.

“Görüntü ve İkili Veri 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

  1. Metin mi, Yapılandırılmış İçerik mi
  2. Türü Belirlenmiş Sonuç Nesnesi Döndürme
  3. İstemciler için Çıktı Şemaları
  4. Görüntü ve İkili Veri Döndürme
← MCP Academy Sayfasına Dön