WarToolsAI
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 7 GitHub stars
Code Fail
- fs.rmSync — Destructive file system operation in packages/node/scripts/build.mjs
- process.env — Environment variable access in packages/node/src/cli.ts
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Open-source toolkit for AI agents with explicit tool activation. Designed for .NET, Python, TypeScript, and Model Context Protocol (MCP).
Give your AI agent tools — but only the ones you turn on.
A tool runtime and MCP server for AI agents, with identical SDKs for TypeScript, Python and .NET.
What is this?
WarToolsAI is a catalog of 50 small, deterministic utilities for agents (clock and timezones, key-value memory, planning scratchpad, safe file access, web fetch, JSON/CSV tooling, hashing, prompt-injection scanning…). You can use it in two ways:
| How | Use it when | |
|---|---|---|
| MCP server | Run one command; Claude Code, Claude Desktop or any MCP client sees the tools | You want tools in an existing agent/client with no code |
| SDK | WarTools.create(...) + kit.execute(name, input) in Node, Python or .NET |
You are building your own agent or backend |
Both expose the same tools, same inputs/outputs and same error codes; that parity is enforced by shared contract tests, not by convention.
Why Default-Off?
Most tool servers advertise everything they have. Every tool schema you send costs tokens on every request, and every tool is something the model can misuse.
WarToolsAI starts with zero tools. Nothing is registered, serialized into the model's context or executable until you enable it by name, glob or preset:
enable: ["time.now", "kv.*"] → 6 tools exposed, everything else invisible
preset: "none" (default) → 0 tools, 0 schema tokens
For scale: all 50 tool schemas together are roughly 3,900 tokens (approxSchemaTokens in the manifest); a typical preset is a fraction of that. A disabled tool that is called anyway returns TOOL_DISABLED; it does not run.
Quick start
Status:
0.1.0, not yet published to npm / PyPI / NuGet. Install from source for now.
git clone https://github.com/jmmana/WarToolsAI.git && cd WarToolsAI
npm ci && npm run build:node
As an MCP server
# stdio (default), the agent-core preset
node packages/node/dist/esm/cli.js --preset agent-core
# only specific tools
node packages/node/dist/esm/cli.js --enable "time.now,kv.*,fs.read_file" --fs-root ./workspace
Claude Code
claude mcp add wartools -- node /absolute/path/WarToolsAI/packages/node/dist/esm/cli.js --preset agent-core
Claude Desktop / any MCP client (claude_desktop_config.json)
{
"mcpServers": {
"wartools": {
"command": "node",
"args": ["/absolute/path/WarToolsAI/packages/node/dist/esm/cli.js", "--enable", "time.now,kv.*"]
}
}
}
HTTP SSE transport: --transport sse --port 3333 (binds to 127.0.0.1 by default).
As an SDK
TypeScriptimport { WarTools, JsonFileKvStore } from '@warlockcode/wartools-ai';
const kit = WarTools.create({
preset: 'none',
enable: ['time.now', 'kv.*', 'fs.read_file'],
security: {
fsRoot: './workspace',
httpAllowDomains: ['api.github.com'],
maxOutputChars: 16000,
timeoutMs: 10000,
},
store: new JsonFileKvStore('./.wartools-store.json'),
});
const res = await kit.execute('time.now', { timezone: 'America/Bogota' });
Python (≥ 3.10)
from warlockcode_wartools_ai import WarTools, JsonFileKvStore, SecurityConfig
kit = WarTools.create(
preset="none",
enable=["time.now", "kv.*"],
security=SecurityConfig(fs_root="./workspace", http_allow_domains=["api.github.com"]),
store=JsonFileKvStore("./.wartools-store.json"),
)
res = kit.execute("time.now", {"timezone": "America/Bogota"})
.NET (net8.0 / net9.0 / netstandard2.0)
using WarlockCode.WarToolsAI;
var kit = WarTools.Create(new WarToolsOptions
{
Preset = "none",
Enable = new[] { "time.now", "kv.*" },
Store = new JsonFileKvStore("./.wartools-store.json")
});
var res = await kit.ExecuteAsync("time.now", new { timezone = "America/Bogota" });
Every call returns the same envelope
{
"ok": true,
"tool": "time.now",
"data": { /* tool-specific output */ },
"error": null, // or { "code": "INVALID_INPUT" | "TOOL_DISABLED" | ... }
"meta": { "durationMs": 1, "truncated": false }
}
Output is capped by maxOutputChars; when it is cut, meta.truncated is true.
Tool catalog
| Domain | Tools |
|---|---|
time |
now · diff · add · convert_tz |
kv |
set · get · delete · list · incr |
scratchpad |
set_plan · update_step · add_note · get_workspace |
fs |
list_dir · read_file · write_file · search_text |
web |
fetch_markdown · fetch_json · extract_links · extract_metadata |
json |
query · repair · validate · diff · flatten |
csv |
parse · summarize · filter_aggregate |
text |
chunk · regex_extract · count_tokens_approx · diff · redact_pii · template_render |
math |
eval · stats · convert_unit |
crypto / encoding |
hash · uuid / base64 · jwt_inspect |
security |
scan_prompt_injection · url_inspect |
doc |
extract_tables · to_markdown_report |
validate / state / catalog / trace |
batch_rules / checkpoint / search / log_event |
Full schemas live in spec/registry-manifest.json, the single source of truth.
Presets
| Preset | Tools | Selectors | For |
|---|---|---|---|
none |
0 | — | Strict default |
minimal |
9 | time.*, kv.get/set/delete/list, catalog.search |
Light stateful agents |
agent-core |
16 | time.*, kv.*, scratchpad.*, state.checkpoint, catalog.search, trace.log_event |
Planning, memory, tracing |
research |
14 | time.now, web.*, text.*, doc.*, security.url_inspect |
Web and document pipelines |
data-ops |
16 | json.*, csv.*, math.*, validate.batch_rules, crypto.*, encoding.* |
Deterministic data work |
Presets and enable combine; see docs/presets.md.
Security model
Tools that touch the outside world are fenced by configuration, not by trust in the model:
- Filesystem (
fs.*): confined tofsRoot; path traversal and symlink escapes returnSANDBOX_PATH_DENIED. - Network (
web.*): only domains inhttpAllowDomains(DOMAIN_NOT_ALLOWED); literal and DNS-resolved private, loopback and link-local addresses are blocked (PRIVATE_NETWORK_BLOCKED); enforced timeouts. - Output limits: every response is truncated at
maxOutputChars. - MCP over HTTP binds to loopback unless you pass
--host.
Details and threat model: docs/security-model.md. Report vulnerabilities per SECURITY.md.
CLI configuration
| Flag / env | Purpose |
|---|---|
--preset <name> |
Start from a preset (default none) |
--enable a,b.* · WARTOOLS_ENABLE |
Enable tools by name or glob |
--fs-root <dir> · WARTOOLS_FS_ROOT |
Sandbox root for fs.* |
--allow-domains a.com,b.com · WARTOOLS_HTTP_ALLOWLIST |
Allowed hosts for web.* |
--store-file <path> |
Persist kv.* to a JSON file |
--trace-file <path> |
Write trace.log_event records to a file |
--config <file.json> |
Same options from a JSON file |
--transport stdio|sse · --port · --host |
MCP transport |
How it is built
| Layer | Location |
|---|---|
| Canonical manifest (tools, schemas, presets) | spec/registry-manifest.json |
| Shared contract tests (17 domain suites) | spec/contracts/*.json |
| Node / TypeScript SDK + MCP | packages/node → @warlockcode/wartools-ai |
| Python SDK + MCP (stdio) | packages/python → warlockcode-wartools-ai |
| .NET SDK | packages/dotnet → WarlockCode.WarToolsAI |
| Workbench (catalog, playground, policy export) | src/ + server.ts, npm run dev → port 3000 |
| Parity check and CI | scripts/sync-manifest.py, .github/workflows/ |
The three SDKs implement every tool independently and must pass the same JSON contract suites; sync-manifest.py fails CI if the manifest, contracts or any language drift apart. Architecture: docs/architecture.md.
Develop and verify
npm run sync:check # manifest ↔ contracts ↔ Node/Python/.NET parity
npm run build:node
npm run test:node # contracts, CJS, MCP stdio, MCP HTTP SSE
npm run test:python
npm run lint
dotnet test packages/dotnet/WarToolsAI.slnx -c Release
Roadmap
Planned tools and runtime features (approval gates, budget limits, retries, SQLite store, cron/time math, patching…) are tracked in issues and docs/roadmap.md. Contributions welcome: see CONTRIBUTING.md.
License
MIT © WarlockCode
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found