0Pricing
MCP Academy · Lektion

Text oder strukturierter Inhalt

Wann Sie einfachen Text und wann Sie Daten zurückgeben sollten.

Text oder strukturierter Inhalt ist eine kostenlose MCP Academy-Lektion auf CoddyKit. Dies ist Lektion 1 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des MCP Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der MCP Academy-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

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. ✅

Häufig gestellte Fragen

Ist die Lektion „Text oder strukturierter Inhalt“ kostenlos?

Ja — der vollständige Text von „Text oder strukturierter Inhalt“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des MCP Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der MCP Academy-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „Text oder strukturierter Inhalt“?

Wann Sie einfachen Text und wann Sie Daten zurückgeben sollten. Du übst MCP Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um MCP Academy zu starten?

Keine Vorkenntnisse erforderlich. MCP Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 1 von 4.

Wie lange dauert die Lektion „Text oder strukturierter Inhalt“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser MCP Academy-Lektion Code schreiben und ausführen?

Ja. Jede MCP Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. Text oder strukturierter Inhalt
  2. Ein typisiertes Ergebnisobjekt zurückgeben
  3. Ausgabeschemas für Clients
  4. Bilder und Binärdaten zurückgeben
← Zurück zu MCP Academy