JIT Tool Synthesis
JITツール合成 v4
LLMを活用したオンデマンドのツール生成、人間による承認、および安全な実行環境を提供します。
概要
このシステムは、LLMを使用してTypeScriptツールを動的に生成し、実行前に人間の承認を求め、サンドボックス環境で実行します。
Related MCP server: code2mcp
アーキテクチャ
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Synthesizer │────▶│ Approval │────▶│ Sandbox │
│ (LLM) │ │ (Human Gate) │ │ (Execution) │
└─────────────┘ └──────────────┘ └─────────────┘
│ │ │
▼ ▼ ▼
Generates TS Waits for Runs in
tool code human approval isolated envコンポーネント
ファイル | 目的 |
| OpenAI互換のLLMを使用してツールコードを生成 |
| 人間による承認ゲート — 実行前に承認が必要 |
| 生成されたコードのための安全な実行環境 |
| ツールの永続化とストレージ |
| MCPサーバー統合 |
| ランタイム設定管理 |
プロバイダー非依存
このツールはあらゆるOpenAI互換のLLM APIで動作します:
OpenRouter — 100以上のモデル (Claude, GPT, Llamaなど)
OpenAI — GPT-4o, o3など
Ollama — ローカルモデル (Llama, Qwenなど)
LM Studio — GUI付きローカルモデル
Groq — 高速推論
その他 — OpenAI互換のあらゆるAPI
セットアップ
# Install dependencies
npm install
# Copy environment template
cp .env.example .envLLMプロバイダーの設定
.envを編集してプロバイダーの詳細を設定します:
# Option 1: OpenRouter (default - 100+ models)
LLM_API_KEY=your-openrouter-key
LLM_BASE_URL=https://openrouter.ai/api/v1
LLM_MODEL=anthropic/claude-sonnet-4-6
# Option 2: OpenAI direct
LLM_API_KEY=sk-...
LLM_BASE_URL=https://api.openai.com/v1
LLM_MODEL=gpt-5.4
# Option 3: Ollama (local)
LLM_BASE_URL=http://localhost:11434/v1
LLM_MODEL=llama-3.3
# Option 4: Groq
LLM_API_KEY=gsk_...
LLM_BASE_URL=https://api.groq.com/openai/v1
LLM_MODEL=llama-3.3-70b-versatile使用方法
ビルド
npm run buildMCP Inspectorでのテスト
すべてが動作することを確認する最も速い方法:
npx @modelcontextprotocol/inspector node dist/server.jsMCPクライアントへの接続
このサーバーはあらゆるMCPクライアントで動作します。設定例:
Claude Desktop — Claude DesktopのMCP設定に追加:
{
"mcpServers": {
"jit-tool-synthesis": {
"command": "node",
"args": ["/absolute/path/to/jit-tool-synthesis/dist/server.js"],
"env": {
"LLM_API_KEY": "your-api-key",
"LLM_BASE_URL": "https://openrouter.ai/api/v1",
"LLM_MODEL": "anthropic/claude-sonnet-4-6"
}
}
}
}Claude Code:
claude mcp add jit-tools node /absolute/path/to/jit-tool-synthesis/dist/server.jsVS Code (Copilot):
code --add-mcp '{"name":"jit-tools","type":"stdio","command":"node","args":["/absolute/path/to/jit-tool-synthesis/dist/server.js"]}'Cursor — .cursor/mcp.jsonに追加:
{
"mcpServers": {
"jit-tools": {
"command": "node",
"args": ["/absolute/path/to/jit-tool-synthesis/dist/server.js"],
"env": { "LLM_API_KEY": "your-api-key" }
}
}
}ランタイム設定
再起動せずにLLMプロバイダーを変更できます:
# View current config
get_config
# Change model at runtime
set_config model=openai/gpt-5.4MCPツール
ツール | 説明 |
| 自然言語から新しいツールを生成 |
| 承認前にサンプルパラメータで保留中のツールをテスト |
| 保留中のツールを有効化 |
| 保留中のツールを破棄 |
| 承認済みのツールを実行 |
| 承認済みのツールを一覧表示 |
| ツールの詳細を表示 |
| ツールを削除 |
| 承認待ちのツールを一覧表示 |
| LLM設定を表示 |
| ランタイムでLLMプロバイダー/モデルを変更 |
ワークフロー
リクエスト — ユーザーがツールを要求 (例: 「カラーコンバーターを作成して」)
合成 — LLMがツールコードを生成
テスト — コミット前にサンプルパラメータで検証
承認 — 人間がコードを確認し、承認
実行 — ツールがサンドボックス環境で実行
保存 — 承認されたツールはセッションをまたいで永続化
環境変数
変数 | 説明 | デフォルト |
| プロバイダーのAPIキー | (クラウド利用時は必須) |
| APIエンドポイント | |
| 使用するモデル | anthropic/claude-sonnet-4-6 |
以下もサポート (レガシー): OPENROUTER_API_KEY, OPENAI_API_KEY, OPENAI_BASE_URL, SYNTHESIZER_MODEL
セキュリティ
生成されたコードは分離されたVMサンドボックス内で実行
ブロックパターンにより危険なコード (process, require, evalなど) を防止
APIキーは設定ファイルに保存されません
ステータス
本番環境対応済み — フェーズ1完了。
Available Tools
8 toolsapprove_toolApprove a synthesized toolD
| Name | Required | Description | Default |
|---|---|---|---|
| tool_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_toolExecute an approved toolD
| Name | Required | Description | Default |
|---|---|---|---|
| tool_name | Yes | ||
| params | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_toolGet tool detailsD
| Name | Required | Description | Default |
|---|---|---|---|
| tool_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_pendingList pending toolsB
Returns a list of tools waiting for approval
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Returns a list') but doesn't cover critical aspects like permissions needed, pagination, rate limits, or what constitutes 'pending' status. This leaves significant gaps for a tool that likely interacts with an approval workflow.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's function without any fluff. It's front-loaded and wastes no words, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of managing pending tools in an approval system, the description is insufficient. With no annotations, no output schema, and siblings like 'approve_tool' and 'reject_tool', it should explain more about the approval context, return format, or how 'pending' is defined. It leaves too much undefined for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a high baseline score for not adding unnecessary information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Returns') and resource ('list of tools waiting for approval'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_tools' or 'get_tool', which might also retrieve tool information, so it falls short of a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as 'list_tools' or 'get_tool'. It lacks context about prerequisites, timing, or exclusions, leaving the agent to infer usage from the name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_toolsList all available toolsB
Returns a list of all approved and available tools
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns a list but doesn't specify format, pagination, sorting, or any constraints like rate limits or authentication needs. For a tool with zero annotation coverage, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is front-loaded and appropriately sized for a simple tool with no parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'approved and available' means, the return format, or how this tool interacts with siblings. For a tool in a context with multiple related tools, more detail is needed to ensure proper use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters, and schema description coverage is 100%, so the schema already documents this fully. The description doesn't need to add parameter details, and it appropriately doesn't mention any. Baseline for 0 parameters is 4, as it avoids unnecessary information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Returns') and resource ('a list of all approved and available tools'), making the purpose understandable. However, it doesn't explicitly distinguish this tool from sibling tools like 'get_tool' or 'list_pending', which might have overlapping or related functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'get_tool' (for a single tool) or 'list_pending' (for pending tools). It lacks explicit context, prerequisites, or exclusions, leaving usage unclear in relation to siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
reject_toolReject a synthesized toolD
| Name | Required | Description | Default |
|---|---|---|---|
| tool_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
remove_toolRemove an approved toolD
| Name | Required | Description | Default |
|---|---|---|---|
| tool_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
synthesize_toolSynthesize a new toolB
Describe a capability you need and this will generate a working tool. Returns a pending tool that needs approval before it becomes available.
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | What the tool should do | |
| example_input | No | Example input to guide generation | |
| example_output | No | Expected output format |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool generates a pending tool requiring approval, which is useful behavioral context. However, it lacks details on permissions needed, rate limits, error conditions, or what 'pending' entails operationally (e.g., storage, visibility). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences that are front-loaded and efficient: the first states the action and input, the second specifies the output and approval requirement. Every sentence earns its place with no wasted words, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (generating new tools with 3 parameters), lack of annotations, and no output schema, the description is minimally adequate. It covers the core purpose and approval workflow but misses details like error handling, return format, or integration with siblings. It's complete enough for basic understanding but has clear gaps for effective agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all three parameters ('description', 'example_input', 'example_output') with their purposes. The description doesn't add any parameter-specific semantics beyond what the schema provides, such as formatting tips or interdependencies. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'generate a working tool' based on a described capability, with the specific outcome of returning 'a pending tool that needs approval'. It uses specific verbs ('generate', 'returns') and identifies the resource ('tool'), but doesn't explicitly differentiate from siblings like 'approve_tool' or 'execute_tool' in terms of workflow role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by stating it 'generates a working tool' and that the result 'needs approval before it becomes available', which suggests it's part of a tool creation workflow. However, it doesn't explicitly state when to use this versus alternatives like 'approve_tool' or 'execute_tool', nor does it provide clear exclusions or prerequisites for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
8 tool updates
v2.0.0- First observed
approve_tool - First observed
execute_tool - First observed
get_tool - First observed
list_pending - First observed
list_tools - First observed
reject_tool - First observed
remove_tool - First observed
synthesize_tool
TDQS
Scored across 8 tools
Most tools have distinct purposes: list_pending and list_tools are clearly different (pending vs. all tools), synthesize_tool creates new tools, and approve_tool/reject_tool/remove_tool handle tool lifecycle. However, get_tool lacks a description, making its distinction from list_tools ambiguous—it might fetch a single tool's details, but this is unclear without context.
All tool names follow a consistent verb_noun pattern with snake_case, such as approve_tool, execute_tool, get_tool, list_pending, list_tools, reject_tool, remove_tool, and synthesize_tool. This uniformity makes the set predictable and easy to understand at a glance.
With 8 tools, this server is well-scoped for managing a tool synthesis and approval workflow. The count supports core operations like listing, creating, approving, rejecting, removing, and executing tools, without being overly sparse or bloated.
The tool set covers a complete lifecycle for tool synthesis: create (synthesize_tool), list (list_pending, list_tools), approve/reject (approve_tool, reject_tool), remove (remove_tool), and execute (execute_tool). A minor gap is the lack of descriptions for tools like get_tool, which might hinder full coverage if it's meant for detailed retrieval, but the core workflow is well-supported.
Maintenance
Related MCP Connectors
Runtime permission, approval, and audit layer for AI agent tool execution.
Give any MCP-compatible AI assistant a builder for live, hosted web tools and workflows.
- AxiomOAuthcom.axiomide
The marketplace where agents don't just use tools — they build, publish, and compose new ones.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables AI models to dynamically create and execute their own custom tools through a meta-function architecture, supporting JavaScript, Python, and Shell runtimes with sandboxed security and human approval flows.510MIT
- FlicenseAqualityNot gradedmaintenanceEnables execution of TypeScript code to call MCP tools instead of direct tool calls, reducing token usage by up to 98% while orchestrating complex multi-tool workflows through secure sandboxed code execution.1-
- AlicenseAqualityDmaintenanceEnables AI-powered generation of production-ready CTP (ConveniencePro Tool Protocol) tools from natural language descriptions, including tool definitions, implementations, tests, and TypeScript validation.57 npmMIT
- AlicenseAqualityBmaintenanceEnables dynamic creation and execution of custom tools/functions in multiple programming languages at runtime, exposing them to MCP clients like Claude.49 npm44MIT