0Pricing
MCP Academy · درس

التعليمات: إرشادات قابلة لإعادة الاستخدام

رسائل مبنية على قوالب يمكن للمستخدمين تشغيلها عند الطلب.

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

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

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

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

هل درس «التعليمات: إرشادات قابلة لإعادة الاستخدام» مجاني؟

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

ماذا ستتعلم في «التعليمات: إرشادات قابلة لإعادة الاستخدام»؟

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

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

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

كم من الوقت يستغرق درس «التعليمات: إرشادات قابلة لإعادة الاستخدام»؟

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

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

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

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

  1. الأدوات: الإجراءات التي يتخذها النموذج
  2. الموارد: البيانات التي يقرأها النموذج
  3. التعليمات: إرشادات قابلة لإعادة الاستخدام
  4. اختيار البدائية المناسبة
← العودة إلى MCP Academy