Skip to content

holiber/unitools

Repository files navigation

unitools

Minimal JS/TS tool runtime with a CLI and MCP wrapper. Tools are plain JavaScript modules that expose schemas and handlers.

Structure

  • src/tool-runtime.js - tool loader, schema builder, and invocation
  • src/tool-cli.js - CLI for schema and tool calls
  • src/tool-mcp.js - MCP wrapper (tool listing only for now)
  • src/tools/*.js - tool implementations
  • test/node/ - Node test suite

Requirements

  • Node.js 18+

npx (from git)

Until this package is published to npm, you can run it directly from GitHub:

Print multitool schema:

npx -y -p github:holiber/unitools#v0.1.0 unitools --tools=* schema

Call a tool method:

npx -y -p github:holiber/unitools#v0.1.0 unitools --tools=echo call echo.echo --input='{"message":"hi"}'

Print MCP-style tool list:

npx -y -p github:holiber/unitools#v0.1.0 unitools-mcp --tools=* --print-tools

CLI usage

Print multitool schema:

node src/tool-cli.js --tools=* schema

Call a tool method:

node src/tool-cli.js --tools=echo call echo.echo --input='{"message":"hi"}'

Print OpenAI-style tools (requires converters tool):

node src/tool-cli.js --tools=* openai-tools

Print MCP-style tools (requires converters tool):

node src/tool-cli.js --tools=* mcp-tools

MCP wrapper

For now, tool-mcp.js prints a stable MCP-like tool list:

node src/tool-mcp.js --tools=* --print-tools

Included tools

  • args - parse argv into a structured object
  • converters - schema converters + toolSchema2md + json2yaml + md2html
  • crypto - encrypt/decrypt text and JSON (AES-256-GCM + PBKDF2)
  • echo - test tool for success/failure/timeout behavior

Tests

node --test test/node/tool-system.test.js test/node/tool-schema.test.js

About

Tools that works everywhere

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors