JIT Tool Synthesis
This server enables on-demand AI-powered tool generation with human approval gates and safe sandboxed execution — allowing you to create, manage, and run dynamically synthesized TypeScript tools using an LLM.
Synthesize tools (
synthesize_tool) — Describe a capability in natural language (with optional example input/output) and the LLM generates a working TypeScript tool, placed in a pending approval queueManage approval workflow — Use
list_pendingto review queued tools,approve_toolto activate them, orreject_toolto discard themExecute tools safely (
execute_tool) — Run approved tools in an isolated VM sandbox with blocked dangerous patternsBrowse and manage tools — Use
list_toolsto see available tools,get_toolfor full details (code, metadata), andremove_toolto delete permanentlyConfigure LLM at runtime — Use
get_configandset_configto view or switch providers (OpenAI, OpenRouter, Ollama, Groq, or any OpenAI-compatible API), models, and base URLs without restarting the server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@JIT Tool SynthesisCreate a tool that fetches the latest top stories from Hacker News"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
JIT Tool Synthesis v4
LLM-powered on-demand tool generation with human-in-the-loop approval and safe execution.
Overview
This system generates TypeScript tools dynamically using an LLM, requires human approval before execution, and runs them in a sandboxed environment.
Related MCP server: Code Mode MCP Server
Architecture
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Synthesizer │────▶│ Approval │────▶│ Sandbox │
│ (LLM) │ │ (Human Gate) │ │ (Execution) │
└─────────────┘ └──────────────┘ └─────────────┘
│ │ │
▼ ▼ ▼
Generates TS Waits for Runs in
tool code human approval isolated envComponents
File | Purpose |
| Generates tool code using any OpenAI-compatible LLM |
| Human-in-the-loop gate — requires approval before execution |
| Safe execution environment for generated code |
| Tool persistence and storage |
| MCP server integration |
| Runtime configuration management |
Provider-Agnostic
This tool works with any OpenAI-compatible LLM API:
OpenRouter — 100+ models (Claude, GPT, Llama, etc.)
OpenAI — GPT-4o, o3, etc.
Ollama — Local models (Llama, Qwen, etc.)
LM Studio — Local models with GUI
Groq — Fast inference
Any other OpenAI-compatible API
Setup
# Install dependencies
npm install
# Copy environment template
cp .env.example .envConfigure Your LLM Provider
Edit .env with your provider details:
# 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-versatileUsage
Build
npm run buildTest with MCP Inspector
The fastest way to verify everything works:
npx @modelcontextprotocol/inspector node dist/server.jsConnect to MCP Clients
This server works with any MCP client. Example configs:
Claude Desktop — add to your Claude Desktop MCP settings:
{
"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 — add to .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" }
}
}
}Runtime Configuration
You can change the LLM provider without restarting:
# View current config
get_config
# Change model at runtime
set_config model=openai/gpt-5.4MCP Tools
Tool | Description |
| Generate a new tool from natural language |
| Test a pending tool with sample params before approval |
| Activate a pending tool |
| Discard a pending tool |
| Run an approved tool |
| List all approved tools |
| View tool details |
| Delete a tool |
| List tools waiting for approval |
| View LLM configuration |
| Change LLM provider/model at runtime |
Workflow
Request — User asks for a tool (e.g., "create a color converter")
Synthesize — LLM generates tool code
Test — Validate with sample params before committing
Approve — Human reviews and approves the code
Execute — Tool runs in sandboxed environment
Store — Approved tools persist across sessions
Environment Variables
Variable | Description | Default |
| API key for your provider | (required for cloud) |
| API endpoint | |
| Model to use | anthropic/claude-sonnet-4-6 |
Also supported (legacy): OPENROUTER_API_KEY, OPENAI_API_KEY, OPENAI_BASE_URL, SYNTHESIZER_MODEL
Security
Generated code runs in isolated VM sandbox
Blocked patterns prevent dangerous code (process, require, eval, etc.)
API keys not stored in config file
Status
Production Ready — Phase 1 complete.
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-serverOAuthai.cdbx
Build Apps and run code in 30 languages — sandboxed, with persistent sessions for agent loops.
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
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with MCP servers by writing TypeScript/JavaScript code instead of direct tool calls. Provides a code execution sandbox that accesses MCP servers through HTTP proxy endpoints.7 npm124Apache 2.0
- 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.55 npmMIT