UT

universal-tool-calling-protocol/code-mode

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

1620 stars 112 forks 品質 86 トレンド 36MPL-2.0

🔌 コード実行を通じてエージェントがMCPおよびUTCPツールを呼び出せるプラグアンドプレイライブラリ。

概要

🤖 コードモードライブラリ:コード実行によるツール呼び出しの最初のライブラリ AIエージェントを扱いにくいツールコールラーから効率的なコード実行者へと変身させましょう — たった3行で。 LLMはコードを書くのが得意ですが、ツール呼び出しには苦手です。何百ものツールを直接公開するのではなく、TypeScriptコードを実行するツールを一つだけ与え、ツールキット全体にアクセスできます。 Apple、Cloudflare、Anthropicは、Code-Modeが従来のダンプ関数情報とJSON抽出に比べてツール呼び出しのより効率的な方法だと述べています。 独立したPythonベンチマーク調査では、1日あたり1,000シナリオでパフォーマンス主張が検証されています。 - 単一のコードブロックが複数のAPI呼び出しを置き換える - LLMはコード生成に優れ、ツールのオーケストレーションに優れている - 操作間のコンテキスト再処理なし ](https://www.youtube.com/watch?v=zsMjkPzmqhA) それだけです。AIエージェントは今や数十回のリクエストではなく、単一のリクエストで複雑なワークフローを実行できるようになりました。

概要(AI 翻訳)

–>

🤖 コードモードライブラリ:コード実行によるツール呼び出しの最初のライブラリ

AIエージェントを扱いにくいツール呼び出し役から効率的なコード実行者へと変貌させる — わずか3行で。

なぜこれがすべてを変えるのか

LLMはコードを書くのが得意ですが、ツール呼び出しには苦手です。何百ものツールを直接公開するのではなく、TypeScriptコードを実行するツールを一つだけ与え、ツールキット全体にアクセスできます。

Apple、Cloudflare、Anthropicは、Code-Modeが従来のダンプ関数情報とJSON抽出に比べてツール呼び出しのより効率的な方法だと述べています。

ベンチマーク

独立したPythonベンチマーク調査は、1日あたり1,000シナリオで年間9,536ドルのコスト削減を可能にパフォーマンス主張を検証しています。

シナリオ複雑度 伝統型 コードモード 改善
シンプル(2〜3ツール) 3回の反復 1回の実行 67%高速
中型(4〜7道具) 8回の反復 1回の実行 75%高速
複雑(8+ツール) 16回の反復 1回の実行 88%高速

なぜコードモードが支配するのか:

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Transform your AI agents from clunky tool callers into efficient code executors — in just 3 lines.

Why This Changes Everything

LLMs excel at writing code but struggle with tool calls. Instead of exposing hundreds of tools directly, give them ONE tool that executes TypeScript code with access to your entire toolkit.

Apple, Cloudflare, and Anthropic say that Code-Mode is a more efficient way to approach tool calling compared to the traditional dump function information and then extract a JSON for function calling.

Benchmarks

Independent Python benchmark study validates the performance claims with $9,536/year cost savings at 1,000 scenarios/day:

Scenario Complexity Traditional Code Mode Improvement
Simple (2-3 tools) 3 iterations 1 execution 67% faster
Medium (4-7 tools) 8 iterations 1 execution 75% faster
Complex (8+ tools) 16 iterations 1 execution 88% faster

Why Code Mode Dominates:

Batching Advantage - Single code block replaces multiple API calls
Cognitive Efficiency - LLMs excel at code generation vs. tool orchestration
Computational Efficiency - No context re-processing between operations

Getting Started

Get Started in 3 Lines

import { CodeModeUtcpClient } from '@utcp/code-mode';

const client = await CodeModeUtcpClient.create();                    // 1. Initialize
await client.registerManual({ name: 'github', /* MCP config */ });  // 2. Add tools
GitHub で README 全文を見る

インストール

npx @utcp/code-mode-mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "code-mode": { "command": "npx", "args": ["@utcp/code-mode-mcp"], "env": { "UTCP_CONFIG_FILE": "/path/to/your/.utcp_config.json" } } } }