0Pricing
MCP Academy · Урок

Инструменты: действия, выполняемые моделью

Функции, которые вызывает искусственный интеллект для выполнения действий.

«Инструменты: действия, выполняемые моделью» — бесплатный урок MCP Academy на CoddyKit. Это урок 1 из 4. Ты можешь прочитать весь урок бесплатно ниже — а потом практиковать его прямо в браузере с встроенным редактором кода и ИИ-репетитором 24/7. Это часть пути обучения MCP Academy, и твой прогресс синхронизируется между веб-версией и приложением CoddyKit. Курс MCP Academy содержит 4 уроков всего.

Части этого урока еще не переведены и отображаются на английском.

Meet the First Primitive

MCP gives a model three building blocks. The first is the tool: a function the AI can actually run to do something in the world. 🔧

Tools Take Action

A tool is for doing, not just knowing. Sending an email, querying a database, or creating a file all belong here because each one changes or fetches live state.

The Model Decides

You expose the tool, but the model chooses when to call it. Based on the conversation, the AI picks the right tool and fills in its arguments for you.

A Tool Is Just a Function

In the Python SDK a tool is a normal function. You mark it with the @mcp.tool() decorator and the server advertises it to clients.

@mcp.tool()
def add(a: int, b: int) -> int:
    return a + b

Every Tool Needs a Name

Each tool carries a name the model uses to call it. By default the function name becomes the tool name, so add and get_weather just work.

Descriptions Guide the AI

The model reads your docstring to learn what a tool does. A clear one sentence summary makes the AI pick the right tool at the right moment.

@mcp.tool()
def add(a: int, b: int) -> int:
    """Add two numbers together."""
    return a + b

Arguments Become a Schema

Your function's parameters turn into an input schema. The model sees the names and types so it knows exactly what data to send.

Results Flow Back

Whatever your tool returns goes back to the model as context. The AI then weaves that result into its reply to the user.

Tools Can Have Side Effects

Because a tool runs real code, it can change things: write to disk, charge a card, or post a message. That power is exactly why tools sit under user control. ⚠️

Model-Controlled by Design

MCP calls tools model-controlled. The model initiates the call, while the host app can still ask the user to approve it before anything runs.

One Tool, One Job

Keep each tool focused on a single clear action. Small, well named tools are far easier for the model to choose correctly than one giant catch-all.

Quick Check

Let's lock in what makes a tool a tool.

Recap: Tools

Nice work! A tool is a model-controlled function that does something. You name it, describe it, type its arguments, and return a result the AI can use. ✅

Часто задаваемые вопросы

Урок «Инструменты: действия, выполняемые моделью» бесплатный?

Да — полный текст урока «Инструменты: действия, выполняемые моделью» бесплатно доступен здесь в веб-версии. Чтобы практиковать его интерактивно (встроенный редактор кода и ИИ-репетитор 24/7) и разблокировать остальной курс MCP Academy, подпишись на CoddyKit PRO. Курс MCP Academy содержит 4 уроков всего.

Чему я научусь в уроке «Инструменты: действия, выполняемые моделью»?

Функции, которые вызывает искусственный интеллект для выполнения действий. Ты практикуешь MCP Academy с помощью реального кода, который запускаешь прямо в браузере, и ИИ-репетитор 24/7 отвечает на твои вопросы во время урока.

Нужен ли мне опыт, чтобы начать MCP Academy?

Предыдущий опыт не требуется. MCP Academy на CoddyKit структурирован для всех уровней — от новичков до продвинутых, поэтому ты можешь начать отсюда или с самого начала и учиться в своем темпе. Это урок 1 из 4.

Сколько времени занимает урок «Инструменты: действия, выполняемые моделью»?

Большинство уроков CoddyKit занимают около 5–10 минут. Каждый из них компактный и интерактивный, поэтому ты постоянно делаешь прогресс и продолжаешь с того же места в веб-версии и приложении.

Можно ли писать и запускать код в этом уроке MCP Academy?

Да. Каждый урок MCP Academy включает встроенный редактор кода, поэтому ты пишешь и запускаешь реальный код прямо в браузере и получаешь моментальную обратную связь от AI — локальная установка не требуется.

Все уроки этого курса

  1. Инструменты: действия, выполняемые моделью
  2. Ресурсы: данные, которые читает модель
  3. Запросы: повторно используемые инструкции
  4. Выбор подходящего примитива
← Назад к MCP Academy