0Pricing
MCP Academy · Ders

Araç Çağrılarını LLM Üzerinden Yönlendirme

Hangi aracın çağrılacağına modelin karar vermesini sağlayın.

Araç Çağrılarını LLM Üzerinden Yönlendirme, CoddyKit'te ücretsiz bir MCP Academy dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, MCP Academy öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. MCP Academy kursu toplamda 4 dersten oluşur.

Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.

Let the Model Decide

So far you chose which tool to call. The real power comes when you hand the decision to an LLM, letting the model pick the right tool for a request.

The Bridge Pattern

Your client becomes a bridge: it discovers MCP tools, describes them to the model, and runs whatever tool the model asks for.

Translate the Schemas

You convert each MCP tool name, description, and inputSchema into the tool format the model API expects, so the model can see its options.

tools = [
  {"name": t.name, "description": t.description,
   "input_schema": t.inputSchema}
  for t in listed.tools
]

Send Tools with the Prompt

You pass that tool list alongside the user message when you call the model. The model now knows exactly what actions are on the table.

msg = client.messages.create(
    model="claude-opus-4-8",
    max_tokens=1024,
    tools=tools,
    messages=messages,
)

The Model Requests a Tool

When the model wants an action, its reply contains a tool_use block with the tool name and the arguments it chose.

for block in msg.content:
    if block.type == "tool_use":
        ...

Run It Over MCP

You take that requested name and input and forward them to the server with call_tool, the same invocation you already know.

result = await session.call_tool(
    block.name, block.input)

Return the Result

Send the tool output back to the model as a tool_result so it can read what happened and continue reasoning.

tool_result = {"type": "tool_result",
  "tool_use_id": block.id,
  "content": result.content[0].text}

Loop Until Done

The model may call several tools in a row. You keep the loop running until it stops requesting tools and gives a final answer.

Two Protocols Meet

Your bridge speaks two languages: the model API for reasoning and MCP for tools. The client quietly translates between them.

Why Not Hardcode

Hardcoding tool choice does not scale. Letting the model route means new MCP servers add new abilities with no change to your logic.

Keep a Human in the Loop

For risky actions, pause before running the tool the model picked and ask the user to approve it first. Routing should not mean blind trust.

Quick Check

What does the model send when it wants your client to run a tool?

Recap: The Model in Charge

You wired up the full loop: describe MCP tools to an LLM, run the tool it picks via call_tool, return the result, and repeat until the answer is ready.

Sıkça Sorulan Sorular

“Araç Çağrılarını LLM Üzerinden Yönlendirme” dersi ücretsiz mi?

Evet — “Araç Çağrılarını LLM Üzerinden Yönlendirme” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve MCP Academy kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. MCP Academy kursu toplamda 4 dersten oluşur.

“Araç Çağrılarını LLM Üzerinden Yönlendirme” dersinde ne öğreneceğim?

Hangi aracın çağrılacağına modelin karar vermesini sağlayın. MCP Academy ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.

MCP Academy öğrenmeye başlamak için deneyim gerekli mi?

Önceden deneyim gerekmez. CoddyKit'te MCP Academy, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.

“Araç Çağrılarını LLM Üzerinden Yönlendirme” dersi ne kadar sürer?

Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.

Bu MCP Academy dersinde kod yazıp çalıştırabilir miyim?

Evet. Her MCP Academy dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.

Bu kursun tüm dersleri

  1. Bir İstemci Oturumu Açma
  2. Araçları ve Kaynakları Keşfetme
  3. Koddan Araç Çağırma
  4. Araç Çağrılarını LLM Üzerinden Yönlendirme
← MCP Academy Sayfasına Dön