Skip to content

About

Default-Off tool runtime and MCP server for AI agents: 62 deterministic tools, identical SDKs for TypeScript, Python and .NET.

Topics

Resources

Contributing

Security policy

Stars

7 stars

Watchers

0 watching

Forks

Repository files navigation

WarToolsAI

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. 62 deterministic tools, all off until you enable them.

Total downloads across npm, PyPI and NuGet

npm downloads PyPI downloads NuGet downloads

Docker MCP Registry

CI Node CI Python CI .NET

License: MIT Docs Β· English Β· EspaΓ±ol

WarToolsAI in action: tools/list, time.now works, fs.read_file is refused until you turn it on


Start in 1 minute

Nothing to clone. The MCP server runs straight from npm with the minimal preset (9 tools: time, a tiny key-value memory and the catalog); everything else stays off.

Add to Cursor Install in VS Code

Client Do this
Claude Code claude mcp add wartools -- npx -y @warlockcode/wartools-ai --preset minimal
Claude Desktop Add to claude_desktop_config.json: {"mcpServers": {"wartools": {"command": "npx", "args": ["-y", "@warlockcode/wartools-ai", "--preset", "minimal"]}}}
Cursor / VS Code Use the buttons above
Python (uvx) uvx --from warlockcode-wartools-ai wartools-ai --preset minimal
Docker docker run -i --rm ghcr.io/jmmana/wartools-ai --preset minimal

Turn on more tools when you need them: --preset research, or --enable "time.*,fs.read_file" --fs-root ./workspace. Then try these in your client:

Paste this What happens
"What time is it in Tokyo?" Calls time.now
"Remember that my deploy day is Friday." Stores it with kv.set; ask again later and kv.get brings it back
"Which tools do you have?" catalog.search lists only what is enabled
"Read the file notes.txt" Rejected with TOOL_DISABLED: fs.read_file is off until you enable it

Try it before installing

WarToolsAI MCP server

The server is listed on Glama. There you can browse its tools and see its quality score, and test it online with the MCP Inspector.

What is this?

WarToolsAI is a catalog of 62 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 the 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.

Install

Same version on all three registries. Pick your language:

Registry Package Install Version
npm @warlockcode/wartools-ai npm i @warlockcode/wartools-ai npm
PyPI warlockcode-wartools-ai pip install warlockcode-wartools-ai PyPI
NuGet WarlockCode.WarToolsAI dotnet add package WarlockCode.WarToolsAI NuGet

Quick start

Status: 1.0.0, published on all three registries: npm i @warlockcode/wartools-ai Β· pip install warlockcode-wartools-ai Β· dotnet add package WarlockCode.WarToolsAI.

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

TypeScript
import { 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" });

Optional: SqliteKvStore

A persistent KvStore backed by SQLite (namespaces, TTL expiry, optional FTS5 index). It is not a tool and never loaded by the core, so the core keeps zero dependencies. All three SDKs share the same on-disk schema (version 1).

SDK Import Driver
Node import { SqliteKvStore } from '@warlockcode/wartools-ai/sqlite' built-in node:sqlite, Node >= 22.5 (22.5-22.12 needs --experimental-sqlite); on Node 18/20 constructing it throws a clear error
Python from warlockcode_wartools_ai import SqliteKvStore stdlib sqlite3 (lazy import)
.NET using WarlockCode.WarToolsAI.Sqlite; separate package WarlockCode.WarToolsAI.Sqlite (Microsoft.Data.Sqlite)
const kit = await WarTools.create({ enable: ['kv.*'], store: new SqliteKvStore('./.wartools.db') });

If SQLite was built without FTS5, ftsAvailable / fts_available / FtsAvailable is false and search falls back to scan + BM25.

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 and status

62 tools shipped, identical in TypeScript, Python and .NET. 1 more tool(s) planned.

Meaning
βœ… Shipped and covered by the shared contract tests
🟑 Implemented, in review (open pull request)
⏳ Planned, tracked in an issue
πŸ’‘ Idea, design only

Shipped tools

Tool Domain Priority What it does
βœ… time.now time P0 Return current date/time in ISO-8601, Unix ms, weekday, and requested IANA timezone.
βœ… time.diff time P0 Calculate exact elapsed duration between two ISO-8601 timestamps.
βœ… time.add time P0 Add or subtract minutes, hours, days, weeks, or months from a base timestamp.
βœ… time.convert_tz time P0 Convert a timestamp from one IANA timezone to another.
βœ… time.business_days time P2 Count business days between two dates or add/subtract business days, with custom weekend and…
βœ… time.cron_next time P2 Compute the next N run times of a 5-field cron expression in an IANA timezone with…
βœ… kv.set kv P0 Persist a JSON value under a namespace/key with optional TTL.
βœ… kv.get kv P0 Retrieve a previously stored JSON value from a session namespace.
βœ… kv.delete kv P0 Delete a key from a KV namespace.
βœ… kv.list kv P0 List active non-expired keys in a namespace filtered by prefix.
βœ… scratchpad.set_plan scratchpad P0 Initialize or replace the active session execution goal and ordered step checklist.
βœ… scratchpad.update_step scratchpad P0 Transition a scratchpad step status and record a concise result summary.
βœ… scratchpad.add_note scratchpad P0 Append a tagged working memory note to the session scratchpad.
βœ… scratchpad.get_workspace scratchpad P0 Retrieve the full scratchpad plan, step statuses, notes, and completion percentage.
βœ… web.fetch_markdown web P1 Fetch an allowlisted HTTP/HTTPS document and convert HTML to clean Markdown.
βœ… web.fetch_json web P1 Execute a guarded HTTP GET request and parse the JSON response.
βœ… web.extract_links web P1 Extract and resolve anchor links from an allowlisted HTML page.
βœ… web.extract_metadata web P1 Extract page title, description, author, publication time, and HTML language metadata.
βœ… json.query json P1 Query JSON objects or strings using deterministic dot/bracket JSONPath expressions.
βœ… json.repair json P1 Repair malformed JSON output (markdown fences, trailing commas, single quotes, unclosed…
βœ… json.validate json P1 Validate a JSON payload against a structural schema and return field-level diagnostics.
βœ… json.diff json P1 Compare two JSON objects and report added, removed, and modified keys.
βœ… text.chunk text P1 Split long text into bounded chunks by paragraph, sentence, or markdown headings.
βœ… text.regex_extract text P1 Extract structured regex matches and capture groups with bounded output.
βœ… text.count_tokens_approx text P1 Estimate token count, word count, line count, and character count deterministically.
βœ… text.diff text P1 Generate a line-by-line unified diff between original and updated text.
βœ… text.apply_patch text P1 Apply a unified diff to text, tolerating line offsets and CRLF; fails atomically with…
βœ… text.rerank_chunks text P1 Rerank text chunks against a query with deterministic BM25 (no embeddings, no network).
βœ… text.detect_language text P3 Detect the language of a text (en, es, pt, fr, de, it or und) with a confidence score and a…
βœ… text.summarize_extractive text P2 Reduce a long text to its N most representative sentences (TF-IDF cosine centrality, optional…
βœ… logs.cluster_templates logs P3 Group log lines by template (timestamps, UUIDs, IPs, hex ids and numbers masked as ) and…
βœ… agent.detect_loop agent P2 Detect loops and stagnation in a window of tool calls (blind retry of an error, same call…
βœ… doc.detect_type doc P2 Detect document type (json, csv, markdown, html, yaml, code, text, empty) from the first 512…
βœ… math.eval math P2 Safely evaluate arithmetic expressions and math functions using a recursive-descent AST.
βœ… math.stats math P2 Compute descriptive statistics (count, sum, mean, median, min, max, stdDev, p95).
βœ… math.convert_unit math P2 Convert values across length, mass, duration, temperature, and digital storage units.
βœ… csv.parse csv P2 Parse delimited CSV/TSV text into typed row objects with pagination.
βœ… csv.summarize csv P2 Profile CSV columns, inferred types, null counts, and distinct sample values.
βœ… csv.filter_aggregate csv P2 Filter CSV rows and compute grouped count, sum, avg, min, or max aggregations.
βœ… fs.list_dir fs P2 List directory entries inside the canonical fsRoot sandbox.
βœ… fs.read_file fs P2 Read a file inside fsRoot with optional line range and maxChars limit.
βœ… fs.write_file fs P2 Write or update a file safely inside the configured fsRoot sandbox.
βœ… fs.search_text fs P2 Search for matching text lines across files inside fsRoot.
βœ… kv.incr kv P2 Atomically increment or decrement a numeric counter in a KV namespace.
βœ… text.redact_pii text P2 Detect and redact emails, phones, Luhn payment cards, IPv4 addresses, and API secrets.
βœ… text.template_render text P2 Render mustache-style templates with strict mode detection for missing variables.
βœ… json.flatten json P2 Flatten nested JSON objects to dotted keys or unflatten them back into objects.
βœ… crypto.hash crypto P3 Compute SHA-256, SHA-384, or SHA-512 cryptographic digests in hex and base64.
βœ… crypto.uuid crypto P3 Generate UUID v4, UUID v7, or ULID identifiers deterministically formatted.
βœ… encoding.base64 encoding P3 Encode or decode UTF-8 strings using standard or URL-safe Base64.
βœ… encoding.jwt_inspect encoding P3 Decode JWT header and claims without signature verification and check expiration.
βœ… security.scan_prompt_injection security P3 Scan untrusted text for prompt injection phrases, role impersonation, and hidden Unicode.
βœ… security.url_inspect security P3 Inspect a URL for protocol, private/loopback network status, punycode, and query params.
βœ… security.redact_secrets security P1 Detect and mask secrets (private keys, cloud/API tokens, JWT, bearer/basic auth, URL…
βœ… security.restore_secrets security P1 Restore <SECRET_n> placeholders from the session's in-memory vault (created by…
βœ… security.vault_clear security P1 Discard the session's in-memory secret vault; returns how many entries were removed.
βœ… validate.batch_rules validate P3 Validate arrays of records against field constraints (required, min, max, email, iso_date…
βœ… state.checkpoint state P3 Save, restore, or list named session checkpoints covering KV and scratchpad state.
βœ… catalog.search catalog P4 Search WarToolsAI capabilities by keyword, domain, or active policy status.
βœ… doc.extract_tables doc P4 Extract structured header/row tables from Markdown or HTML documents.
βœ… doc.to_markdown_report doc P4 Compile structured sections and data tables into a formatted Markdown report.
βœ… trace.log_event trace P4 Record a structured execution trace event to the configured session trace sink.

Planned tools

Tool Domain What it does Tracking
⏳ kv.search kv Search stored values. #64

Runtime and store features

Feature What it does Tracking
βœ… Approval gate (requiresApproval) Single-use approvals bound to tool, arguments and session #68
βœ… Budget guard Per-session limits on calls, per-tool calls and cost #66
βœ… Retry with backoff + idempotency cache Safe retries for flaky tools #67
βœ… SqliteKvStore Persistent KV with TTL, namespaces and FTS5 #65
πŸ’‘ wartools-ml (ONNX models) Optional separate package #69

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 to fsRoot; path traversal and symlink escapes return SANDBOX_PATH_DENIED.
  • Network (web.*): only domains in httpAllowDomains (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) apps/workbench/, 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

About

Default-Off tool runtime and MCP server for AI agents: 62 deterministic tools, identical SDKs for TypeScript, Python and .NET.

Topics

Resources

Contributing

Security policy

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages