Text vs Structured Content
When to return plain text and when to return data.
Text vs Structured Content is a free MCP Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the MCP Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
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. ✅
Frequently asked questions
Is the “Text vs Structured Content” lesson free?
Yes — the full text of “Text vs Structured Content” is free to read here on the web, and the MCP Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the MCP Academy course, upgrade to CoddyKit PRO.
What will I learn in “Text vs Structured Content”?
When to return plain text and when to return data. You practise MCP Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start MCP Academy?
No prior experience is required. MCP Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Text vs Structured Content” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this MCP Academy lesson?
Yes. Every MCP Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Text vs Structured Content
- Return a Typed Result Object
- Output Schemas for Clients
- Return Images & Binary Blobs