0Pricing
MCP Academy · درس

المحتوى النصي في مقابل المنظم

تعرّفوا على حالات إرجاع النص العادي وحالات إرجاع البيانات.

المحتوى النصي في مقابل المنظم درس مجاني في MCP Academy على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في MCP Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة MCP Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

Two Ways to Reply

Every MCP tool result carries content, and you choose its shape. The big split is plain text versus structured data the client can parse.

What Text Content Is

A text result is just a string for the model to read, like a sentence or a paragraph. It is simple, human-friendly, and easy to drop into a prompt. 📝

What Structured Content Is

Structured content is real data, like a JSON object with named fields. Clients can read each field instead of guessing from prose.

{"temp_c": 21, "condition": "sunny", "city": "Cappadocia"}

Why Text Alone Can Fail

If a tool returns "It is 21 degrees and sunny," the client must parse that English to use it. Wording changes break the parsing instantly.

Why Structure Wins for Code

With structured output, a client reads result.temp_c directly. The shape is predictable, so apps and agents can rely on it without scraping text.

You Can Send Both

MCP lets a tool return a readable text summary and structured data together. The model reads the prose; code reads the fields.

When Text Is the Right Call

Pick plain text when the answer is a message for a human to read, like an explanation, a status note, or a short summary.

When Structure Is the Right Call

Pick structured content when another program will consume the result, such as a price, a record, or a list of items to act on.

Default Is Text

If your tool just returns a string, MCP wraps it as text content automatically. Structured output is something you opt into on purpose.

def get_status() -> str:
    return "All systems healthy"

Think Consumer First

Ask who reads the result: a human, the model, or downstream code? That consumer decides whether you reach for text or structure.

Mixing Is Common

Mature tools usually return both: a friendly summary for the model plus a typed payload for the app. This keeps the result useful on every side.

Quick Check

A tool feeds prices into a billing app. Which output fits best?

Recap: Text vs Structure

You learned the two result shapes: readable text for humans and the model, and structured data for code. Match the shape to who reads it. ✅

الأسئلة الشائعة

هل درس «المحتوى النصي في مقابل المنظم» مجاني؟

نعم — نص درس «المحتوى النصي في مقابل المنظم» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة MCP Academy، انتقل إلى CoddyKit PRO. تتضمن دورة MCP Academy 4 دروس في المجموع.

ماذا ستتعلم في «المحتوى النصي في مقابل المنظم»؟

تعرّفوا على حالات إرجاع النص العادي وحالات إرجاع البيانات. تتمرن على MCP Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ MCP Academy؟

لا تُشترط خبرة سابقة. MCP Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.

كم من الوقت يستغرق درس «المحتوى النصي في مقابل المنظم»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس MCP Academy هذا؟

نعم. كل درس في MCP Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. المحتوى النصي في مقابل المنظم
  2. إرجاع كائن نتيجة مكتوب الأنواع
  3. مخططات المخرجات للعملاء
  4. إرجاع الصور والبيانات الثنائية
← العودة إلى MCP Academy