Prompts: Wiederverwendbare Anweisungen
Vorlagen für Nachrichten, die Benutzer bei Bedarf auslösen können.
Prompts: Wiederverwendbare Anweisungen ist eine kostenlose MCP Academy-Lektion auf CoddyKit. Dies ist Lektion 3 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.
The Third Primitive
The last building block is the prompt: a reusable, templated message a user can trigger to start a task the right way. 💬
Prompts Are Templates
Think of a prompt as a saved instruction with blanks to fill in. Instead of retyping a long request, the user picks it and supplies a few inputs.
User-Controlled by Design
Prompts are user-controlled: the person explicitly chooses one, often from a slash menu or button. The model does not summon them on its own.
Declaring a Prompt
In Python you mark a function with @mcp.prompt(). It returns the text that becomes the starting message for the conversation.
@mcp.prompt()
def summarize(text: str) -> str:
return f"Summarize this:\n{text}"Arguments Fill the Blanks
A prompt's function parameters become its fillable slots. The host shows fields, the user types values, and they slot into the template.
Output Can Be Messages
A prompt can return more than one line. It may produce a list of messages with roles, shaping a richer multi-turn starting point.
Discoverable Like the Rest
Clients can list the prompts a server offers, just as they list tools and resources. That is how a slash-command menu gets populated.
Consistency for Everyone
A shared prompt captures a proven way to ask. Everyone on a team gets the same high-quality phrasing without memorizing it.
A Code-Review Example
A review prompt might take a code snippet and frame it: please review this for bugs and style. The user just pastes the code.
@mcp.prompt()
def review(code: str) -> str:
return f"Review this code for bugs:\n{code}"Not a Tool, Not a Resource
A prompt does not run code or fetch data. It simply seeds the conversation with well crafted instructions for the model to follow.
Where Prompts Shine
Reach for a prompt for repeatable workflows: summarize this, explain this error, draft a release note. Common asks become one click.
Quick Check
Let's pin down who controls a prompt.
Recap: Prompts
You've got it! A prompt is a user-triggered template with fillable arguments. It returns ready-made messages so common requests stay consistent. ✅
Häufig gestellte Fragen
Ist die Lektion „Prompts: Wiederverwendbare Anweisungen“ kostenlos?
Ja — der vollständige Text von „Prompts: Wiederverwendbare Anweisungen“ 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 „Prompts: Wiederverwendbare Anweisungen“?
Vorlagen für Nachrichten, die Benutzer bei Bedarf auslösen können. 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 3 von 4.
Wie lange dauert die Lektion „Prompts: Wiederverwendbare Anweisungen“?
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
- Tools: Aktionen des Modells
- Ressourcen: Vom Modell gelesene Daten
- Prompts: Wiederverwendbare Anweisungen
- Das richtige Primitiv auswählen