Advanced Tool Useのロゴ

Advanced Tool Use

組織
UitbreidenOS
advanced-tool-use

Master advanced tool use patterns including chaining, parallel calls, and error recovery for complex Claude Code workflows

概要

公開者UitbreidenOS
リポジトリUitKit
スキル名advanced-tool-use
スター
14
フォーク
5
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    UitbreidenOSがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Advanced Tool Use」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/UitbreidenOS/UitKit/tree/main/plugins/uitkit-ai-engineering/skills/advanced-tool-use
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UitbreidenOS/UitKit.git /tmp/UitKit
mkdir -p .claude/skills
cp -r /tmp/UitKit/plugins/uitkit-ai-engineering/skills/advanced-tool-use .claude/skills/advanced-tool-use
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでAdvanced Tool Useを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にAdvanced Tool Useを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Advanced Tool Useは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Advanced Tool Use

When to activate

User wants to optimize tool use patterns in Claude API applications, reduce tokens from tool definitions or call overhead, improve accuracy on complex tool parameters, or build sophisticated tool-calling workflows.

When NOT to use

  • Simple single-tool workflows where overhead optimization is irrelevant
  • Applications using the standard Messages API with fewer than 5 tools and no repeated calls
  • Debugging a broken tool definition — fix correctness first, then optimize

Instructions

Pattern 1: Programmatic Tool Calling (PTC)

Claude writes Python orchestration code instead of calling tools one-at-a-time. Reduces round trips and tokens.

Token reduction: ~37% for multi-tool workflows.

Enable per tool:

python
{
    "name": "read_file",
    "description": "Read a file",
    "input_schema": {"type": "object", "properties": {"path": {"type": "string"}}, "required": ["path"]},
    "allowed_callers": ["code_execution_20250825"],
}

When enabled, Claude may choose to write a Python loop calling this tool N times instead of making N separate tool_use blocks. Use for: repetitive read/lookup patterns, data transformation pipelines, any tool called >3 times per turn.

Do not enable for tools with side effects (write, delete, deploy) or tools requiring per-call authorization.


Pattern 2: Dynamic Filtering for Web Tools

New built-in tool types for web search and fetch that filter results before they enter context.

Beta header required: anthropic-beta: code-execution-web-tools-2026-02-09

Token reduction: ~24% fewer input tokens. Accuracy improvement: +13–16 percentage points.

python
import anthropic

client = anthropic.Anthropic(default_headers={"anthropic-beta": "code-execution-web-tools-2026-02-09"})

response = client.messages.create(
    model="claude-opus-4-5",
    max_tokens=2048,
    tools=[
        {"type": "web_search_20260209", "name": "web_search"},
        {"type": "web_fetch_20260209", "name": "web_fetch"},
    ],
    messages=[{"role": "user", "content": "What is the current price of NVDA stock?"}],
)

With these tool types, Claude writes filtering code that extracts only the relevant data from search results or fetched pages before the content enters the context window. A full web page that is 50,000 tokens becomes a 200-token extract.


Pattern 3: Tool Search / Deferred Loading

For large tool catalogs, defer infrequently-used tools so they are not loaded into context unless needed.

Token reduction: ~85% for catalogs with many tools.

Enable via environment variable:

ENABLE_TOOL_SEARCH=auto:N

Where N is the threshold — tools beyond the top N most relevant are deferred.

Mark individual tools as deferrable:

python
{
    "name": "advanced_analytics",
    "description": "Run complex analytics queries",
    "input_schema": {...},
    "defer_loading": True,  # Only load when Claude needs this tool
}

Deferred tools are discovered by Claude on-demand via MCPSearch when it determines it needs a capability that is not in the current loaded context. Use for: large MCP tool catalogs, enterprise APIs with hundreds of endpoints, plugin systems where most tools are rarely used.

Do not defer tools that are called in almost every conversation — the discovery overhead eliminates the savings.


Pattern 4: Tool Use Examples (input_examples)

Add concrete call examples to tool definitions beyond the JSON schema.

Accuracy improvement: ~72% → ~90% on complex parameters.

python
{
    "name": "query_database",
    "description": "Run a SQL query against the analytics database",
    "input_schema": {
        "type": "object",
        "properties": {
            "query": {"type": "string", "description": "SQL query to execute"},
            "timeout_seconds": {"type": "integer", "description": "Max execution time"},
            "read_only": {"type": "boolean", "description": "Enforce read-only mode"},
        },
        "required": ["query"],
    },
    "input_examples": [
        {
            "query": "SELECT user_id, count(*) as orders FROM orders WHERE created_at > NOW() - INTERVAL '7 days' GROUP BY user_id ORDER BY orders DESC LIMIT 10",
            "timeout_seconds": 30,
            "read_only": True,
        },
        {
            "query": "SELECT AVG(order_value) FROM orders WHERE status = 'completed'",
            "read_only": True,
        },
    ],
}

input_examples is most valuable for:

  • Tools with non-obvious parameter combinations
  • Complex nested schemas
  • Parameters where the format matters more than the type (SQL strings, regex, JSON paths)
  • Tools where Claude consistently makes the same parameter mistake without examples

Combining Patterns

Maximum efficiency stack for a large tool catalog:

python
tools = [
    # Frequently used tools — loaded always, PTC enabled, with examples
    {
        "name": "read_file",
        "allowed_callers": ["code_execution_20250825"],
        "input_examples": [{"path": "/src/api/users.ts"}],
        ...
    },
    # Infrequently used tools — deferred
    {
        "name": "run_migration",
        "defer_loading": True,
        ...
    },
    # Last frequent tool — cache everything up to here
    {
        "name": "list_files",
        "cache_control": {"type": "ephemeral"},
        ...
    },
]

Use web tool types when web search/fetch is in scope:

python
tools += [
    {"type": "web_search_20260209", "name": "web_search"},
    {"type": "web_fetch_20260209", "name": "web_fetch"},
]

Example

An agent with 120 tools (full API surface of a SaaS platform):

Without optimization: 120 tool definitions × ~150 tokens each = ~18,000 tokens per call, just for tool definitions. Most tools are never called.

With deferred loading (ENABLE_TOOL_SEARCH=auto:10): only the 10 most likely tools are loaded. Token cost for tool definitions drops from 18,000 to ~1,500 — 85% reduction. When Claude needs a rarely-used tool, it searches and loads it on demand, adding ~200 tokens for that turn only.

Adding input_examples to the 10 always-loaded tools raises parameter accuracy from 72% to 90% on the tools that matter most.


よくある質問

AIスキル「Advanced Tool Use」では何ができますか?

Master advanced tool use patterns including chaining, parallel calls, and error recovery for complex Claude Code workflows

TypingMindでAdvanced Tool Useを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Advanced Tool Useはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにAdvanced Tool Useをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/UitbreidenOS/UitKit/tree/main/plugins/uitkit-ai-engineering/skills/advanced-tool-useを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Advanced Tool Useを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Advanced Tool Useで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもAdvanced Tool Useを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Advanced Tool Use」は無料ですか?

UitbreidenOSがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇