0Pricing
MCP Academy · Lekcja

Treść tekstowa a ustrukturyzowana

Dowiedz się, kiedy zwracać zwykły tekst, a kiedy dane.

Treść tekstowa a ustrukturyzowana to bezpłatna lekcja MCP Academy na CoddyKit. To lekcja 1 z 4. Możesz przeczytać całą lekcję poniżej za darmo — a potem ćwiczyć ją interaktywnie w przeglądarce z wbudowanym edytorem kodu i tutorem AI dostępnym 24/7. To część ścieżki edukacyjnej MCP Academy, a Twój postęp synchronizuje się między webem a aplikacją CoddyKit. Kurs MCP Academy zawiera 4 lekcji w sumie.

Części tej lekcji nie zostały jeszcze przetłumaczone i są wyświetlane po angielsku.

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

Często zadawane pytania

Czy lekcja „Treść tekstowa a ustrukturyzowana” jest bezpłatna?

Tak — pełny tekst „Treść tekstowa a ustrukturyzowana” jest dostępny za darmo tutaj w sieci. Aby ćwiczyć ją interaktywnie (wbudowany edytor kodu i tutor AI dostępny 24/7) i odblokować resztę kursu MCP Academy, przejdź na CoddyKit PRO. Kurs MCP Academy zawiera 4 lekcji w sumie.

Co nauczysz się w „Treść tekstowa a ustrukturyzowana”?

Dowiedz się, kiedy zwracać zwykły tekst, a kiedy dane. Ćwiczysz MCP Academy z praktycznym kodem, który uruchamiasz bezpośrednio w przeglądarce, a tutor AI dostępny 24/7 odpowiada na Twoje pytania podczas pracy nad lekcją.

Czy potrzebuję doświadczenia, aby zacząć MCP Academy?

Nie wymagamy żadnego doświadczenia. MCP Academy w CoddyKit jest strukturyzowany dla początkujących i zaawansowanych użytkowników, więc możesz zacząć tutaj lub od początku i uczyć się w swoim tempie. To lekcja 1 z 4.

Ile czasu zajmuje lekcja „Treść tekstowa a ustrukturyzowana”?

Większość lekcji CoddyKit trwa około 5–10 minut. Każda lekcja to mały, interaktywny krok, dzięki czemu robisz systematyczne postępy i zawsze wracasz dokładnie do tego samego miejsca — na webie i w aplikacji.

Czy mogę pisać i uruchamiać kod w tej lekcji MCP Academy?

Tak. Każda lekcja MCP Academy zawiera wbudowany edytor kodu, więc piszesz i uruchamiasz prawdziwy kod bezpośrednio w przeglądarce i od razu otrzymujesz sprzężenie zwrotne od AI — bez konfiguracji na komputerze.

Wszystkie lekcje w tym kursie

  1. Treść tekstowa a ustrukturyzowana
  2. Zwracanie typowanego obiektu wyniku
  3. Schematy danych wyjściowych dla klientów
  4. Zwracanie obrazów i danych binarnych
← Powrót do MCP Academy