Zum Hauptinhalt springen
T

tool-mode

try-works/tool-mode

Install Desert Ant Labs on-device models as DSH tools and skills, with per-platform capability gating

Installation

dsh plugin --profile web add github:try-works/tool-mode

README

Tool Mode

Give your DSH agent real tools for the models on your machine.

npm license

Tool Mode turns local and on-device models into typed tools that an agent can actually call. Instead of pretending a model is a chat endpoint, it registers tools such as lang_detect, stt_transcribe, semantic_rank and structured_extract, with explicit input/output schemas and an honest answer for every model that cannot run on this machine.

Tool Mode landing page: expose on-device AI as callable agent tools, with a Laya decision-family model card and links to install the plugin and read the docs

Tool Mode: expose on-device AI as callable agent tools.

New to Tool Mode? Start with the documentation → installation takes a few minutes.

Why Tool Mode

  • Tools, not model names. The agent asks for lang_detect; which model or route serves it is a deployment decision. Swapping the model does not change the tool schema.
  • Capability-aware. A model is registered only when it can run here, or is deliberately exposed as unavailable with the reason. No tool that fails on every call.
  • Local-first. Models can run in-process, through the Desert Ant CLI, through a user-hosted bridge, or as an installed extension.
  • Remote Jev when you want it. The optional Jev typed-question API adds remote decision tools; it is explicitly opt-in and is not a local checkpoint.
  • One surface for agents and MCP. The same tools are available to DSH and to MCP clients over an authenticated loopback endpoint.
  • Operable. Model toggles, extensions, custom tools, usage insights and security controls live in DSH settings.
Tool Insights dashboard showing call volume, success rate, latency, model attribution, and the tool performance table

Tool Insights: usage, latency, success and model attribution for every tool.

Install

Tool Mode is a DSH bundle. Install it into a profile:

dsh plugin --profile web add @try-works/dsh-tool-mode

Restart DSH, then open Settings → Tool Mode. Enable a model — Tongue is the simplest first choice because its 2 MB model ships inside the npm package and needs no runtime download.

Ask the agent:

Detect the language of “Bonjour, comment allez-vous ?”

It calls lang_detect and returns the language with confidence and ranked alternatives.

Full instructions, manual installs and upgrade notes are in Installation.

Models

Tool Mode ships with the 18-model Desert Ant catalog. The first-party extensions below add more models and tools; Tongue and Voz appear in both lists because they are catalog models with first-party implementations. Availability depends on the platform, installed runtimes, prepared assets and enabled extensions.

Desert Ant catalog

ModelTaskWindows x64
AlignAudio word alignmentBrowser-only SDK
ClearSpeech enhancementBrowser-only SDK
ClipsVideo clip selectionBrowser-only SDK
EarSpoken-language identificationBrowser-only SDK
EmoEmoji suggestionBrowser-only SDK
EyeImage frame scoringClosed beta
FaceFace matchingClosed beta
GistTopic taggingBrowser-only SDK
ModeratorNSFW detectionBrowser-only SDK
RedactPII redactionBrowser-only SDK
SchemerStructured extractionClosed beta
ShapesStroke shape recognitionBrowser-only SDK
TitleTitle generationApple only
TongueLanguage detectionYes — pure JavaScript, weights bundled
ToxicToxicity detectionClosed beta
UhmFiller detectionApple only
VozSpeech-to-textYes — ONNX Runtime, ~367 MB weights on first use
WhoSpeaker labelingClosed beta

Extension models

ModelToolsNotes
Laya decision familydecision_choose, decision_choose_local, decision_score, decision_score_typed, decision_test, decision_test_typedLocal decision checkpoint
EmbeddingGemma 2multimodal_embed, semantic_similarity, semantic_rank, semantic_classify, semantic_deduplicate, dedupe_and_rank, media_find_momentsText, image and audio embeddings
MiniLM embedtext_embed384-dimensional compatibility space
MiniLM reranktext_rerankCross-encoder ranking
Cactus Needle 3structured_extract, extract_with_repair, validate_record, tools_planStructured extraction and tool planning
Cactus Miragemirage_describe, mirage_detect, mirage_ocr, mirage_extractVision: describe, detect, OCR, forms
Harness Visiondescribe_imageImage description through an authorized harness model
Harness Text Toolstext_titleTitle and summary generation
Declarative recipesRecipe-defined toolsHarness-model-backed recipes
Redactredact_textPII spans over the Redact LiteRT artifact (Effect runtime layer)
Shapes (declarative)shape_recognizeCode-free package: manifest + model-runtime recipe

Use tool_mode_list for the live answer in your process. The complete table, per-model details and the reason for every unavailable model are in Models.

Tools

The current tool surface is grouped below. Exact availability depends on installed extensions, enabled models and the caller's grant; use tool_mode_list for the live list and tool_mode_describe for schemas.

Language, audio and embeddings

ToolBacked by
lang_detectTongue
stt_transcribeVoz
text_embedMiniLM embed
text_rerankMiniLM rerank
multimodal_embedEmbeddingGemma 2
semantic_similarityEmbeddingGemma 2
semantic_rankEmbeddingGemma 2
semantic_classifyEmbeddingGemma 2
semantic_deduplicateEmbeddingGemma 2
dedupe_and_rankEmbeddingGemma 2
media_find_momentsEmbeddingGemma 2

Vision and structured work

ToolBacked by
describe_imageHarness Vision
mirage_describeCactus Mirage
mirage_detectCactus Mirage
mirage_ocrCactus Mirage
mirage_extractCactus Mirage
structured_extractCactus Needle 3
extract_with_repairCactus Needle 3
validate_recordCactus Needle 3
tools_planCactus Needle 3
text_titleHarness Text Tools

Decisions

ToolBacked by
decision_chooseLaya
decision_choose_localLaya
decision_scoreLaya
decision_score_typedLaya
decision_testLaya
decision_test_typedLaya
decision_combineHost
decision_evaluateHost
decision_routeHost
decision_choose_jevRemote Jev API (opt-in)
decision_judgments_jevRemote Jev API (opt-in)

Discovery, management and Code Mode

ToolPurpose
tool_mode_listLive tool catalogue, readiness and catalog revision
tool_mode_describeSchemas, semantics, limits and unsupported cases
model_toolsHost-local model and extension management view
tool_mode_runBounded multi-tool program; only when Code Mode is released

Runtime layer (Effect)

ToolBacked by
redact_textRedact LiteRT artifact through the Effect runtime layer
shape_recognizeShapes declarative package (manifest + model-runtime recipe, no code)
detect_fillersUhm declarative package (ONNX runtime layer)
enhance_speechClear declarative package (ONNX runtime layer, returns enhanced WAV base64)
classify_nsfwModerator declarative package (LiteRT runtime layer, PNG input)
identify_languageEar declarative package (LiteRT runtime layer, 16 kHz WAV)
suggest_emojisEmo declarative package (LiteRT runtime layer, text → emoji suggestions)

Full descriptions and schemas: Tool reference.

Remote Jev (optional)

Tool Mode also supports Jev, TypeSafe's remote System One typed-question API. Jev is not a local model and has no local weights: enabling it adds a deliberate network route for decision tasks.

- id: model-tools
  config:
    jev:
      enabled: true
      model: jev-1.14
      # apiKey: ...                 # direct operator config
      # credentialRef: jev/api-key  # DSH credentials service (default)
      # apiKeyEnv: TYPESAFE_API_KEY # environment fallback

When enabled, it registers:

  • decision_choose_jev — choose one of 2–16 options through Jev.
  • decision_judgments_jev — batch independent yes/no judgments through Jev.

The API key is resolved in this order: jev.apiKey, the DSH credential reference (default jev/api-key), then apiKeyEnv (default TYPESAFE_API_KEY). A missing key produces a named JEV_API_KEY_NOT_CONFIGURED diagnostic; there is no fake answer and no silent local fallback. Set baseURL only if you use a compatible endpoint other than the default.

Jev is opt-in and network-bound. Leave it disabled for a no-network deployment. See Configuration: Jev.

Use it from an MCP client

Enable the endpoint in your profile:

- id: model-tools
  config:
    mcpV3:
      enabled: true
      host: 127.0.0.1
      port: 3765
      path: /mcp

Provide the bearer token through DSH_TOOL_MODE_MCP_TOKEN or a tokenFile, then connect Claude Desktop, Cursor or another MCP client. The endpoint serves MCP 2026-07-28 over loopback HTTP, with per-client grants and tool-level export policy.

See Connect an MCP client. For wire behavior, see the MCP protocol reference.

What is in this repository

FolderRuntimeStatus
dsh-tool-modeDeepSeek Harness (DSH)Available — plugin, contracts, extension SDK, extensions, tests
opencode-tool-modeOpenCodePlanned
pi-tool-modePiPlanned

The DSH implementation is a monorepo. The published plugin is @try-works/dsh-tool-mode; the repository also contains the model-free contracts, the public extension SDK, first-party model extensions, and verification tooling.

Documentation

Read thisIf you want to…
Documentation homeStart at the beginning
InstallationAdd the plugin to a profile
First toolMake a first successful call
Using tools in DSHDay-to-day use with an agent
ExtensionsAdd model tools beyond the catalog
Custom toolsCreate HTTP, prompt or composite tools
SecurityUnderstand tokens, grants and approvals
TroubleshootingDiagnose a missing tool or MCP problem
Tool referenceSee every tool and its backing model
ConfigurationChange profile behavior

Requirements

  • Node.js 24+
  • DSH 0.2.1-rc.2+
  • A supported platform for the model you want to run

The plugin starts cleanly without model runtimes; it reports what is missing rather than failing at call time.

Development

The DSH monorepo lives in dsh-tool-mode. Build, test and verification commands run from there:

cd dsh-tool-mode
npm ci
npm run link:dsh -- --checkout /path/to/deepseek-harness
npm run build
npm test
npm run verify

link:dsh is required for local development because the DSH peer packages are supplied by a DSH checkout rather than installed by npm.

Useful references:

License

Apache License 2.0. See LICENSE.

Model weights and SDKs keep their own vendor licenses; Tool Mode does not redistribute model weights. See the model pages for the applicable terms.

Ähnliche Plugins