The Model Context Protocol consists of four primary primitives that enable powerful interactions between clients and servers. 模型上下文协议由四个主要原语组成,实现了客户端和服务器之间的强大交互。 モデルコンテキストプロトコルは、クライアントとサーバー間の強力な相互作用を可能にする4つの主要なプリミティブで構成されています。
Resources are passive data that servers expose to clients. They function like file reading. A resource could be a text file, a database row, or an image.
资源是服务器向客户端公开的被动数据。它们的功能类似于文件读取。资源可以是文本文件、数据库行或图像。
リソースは、サーバーがクライアントに公開する受動的なデータです。ファイル読み込みのように機能します。リソースは、テキストファイル、データベースの行、または画像などが該当します。
Tools are executable functions that the model can call. They allow the AI to take action or fetch dynamic data.
工具是模型可以调用的可执行函数。它们允许 AI 采取行动或获取动态数据。
ツールは、モデルが呼び出すことができる実行可能な関数です。AIがアクションを起こしたり、動的なデータを取得したりすることを可能にします。
Prompts are pre-defined templates that servers provide to help users or models start interactions effectively.
提示词是服务器提供的预定义模板,旨在帮助用户或模型有效地开始交互。
プロンプトは、ユーザーやモデルが効果的に対話を開始できるようにサーバーが提供する事前定義されたテンプレートです。
Sampling allows the server to request a completion from the host's LLM. This enables "agentic" loops where the server can think and act autonomously.
采样允许服务器向主机的 LLM 请求补全。这实现了“代理”循环,服务器可以自主思考和行动。
サンプリングにより、サーバーはホストのLLMに補完を要求できます。これにより、サーバーが自律的に思考し行動できる「エージェント」ループが可能になります。