Liking cljdoc? Tell your friends :D

toolnexus.tool


add-toolsclj/s

(add-tools tk tools)
source

all-toolsclj/s

(all-tools tk)
source

code-pointsclj/s

s as a vector of Unicode code points — koine.text/code-points.

Lived here first: this port found the divergence (nine sites sorting differently on the two hosts) and carried the fix locally until koine 0.11.0 lifted it into the seam, where a clojure.core divergence belongs. The vars stay so call sites and tests read tool/…, but there is ONE implementation.

`s` as a vector of Unicode code points — `koine.text/code-points`.

Lived here first: this port found the divergence (nine sites sorting
differently on the two hosts) and carried the fix locally until koine 0.11.0
lifted it into the seam, where a clojure.core divergence belongs. The vars
stay so call sites and tests read `tool/…`, but there is ONE implementation.
sourceraw docstring

compare-stringsclj/s

Code-point string comparison, identical on both hosts — koine.text/compare-strings. See code-points for why this delegates.

Code-point string comparison, identical on both hosts — `koine.text/compare-strings`.
See `code-points` for why this delegates.
sourceraw docstring

executeclj/s

(execute tk name args)
(execute tk name args ctx)

Run a tool by name. A THROW from a tool becomes an error ToolResult — a misbehaving tool must not take down the loop (SPEC §0.8).

Run a tool by name. A THROW from a tool becomes an error ToolResult — a
misbehaving tool must not take down the loop (SPEC §0.8).
sourceraw docstring

failureclj/s

(failure output)
(failure output metadata)

A failed ToolResult. Note a tool ERROR is a VALUE handed back to the model, not a thrown exception — the model is meant to see it and try again. NOT named err, for the reason given on success.

A failed ToolResult. Note a tool ERROR is a VALUE handed back to the model,
not a thrown exception — the model is meant to see it and try again.
NOT named `err`, for the reason given on `success`.
sourceraw docstring

sanitizeclj/s

(sanitize s)

SPEC §0.2 — replace [^a-zA-Z0-9_-] with _.

SPEC §0.2 — replace [^a-zA-Z0-9_-] with _.
sourceraw docstring

sort-stringsclj/s

(sort-strings coll)

coll sorted by compare-stringskoine.text/sort-strings, returned as a vector because every caller here treats tool lists as vectors.

`coll` sorted by `compare-strings` — `koine.text/sort-strings`, returned as a
vector because every caller here treats tool lists as vectors.
sourceraw docstring

successclj/s

(success output)
(success output metadata)

A successful ToolResult (SPEC §0.1).

NOT named ok: cljgo's clojure.core HAS ok and err (the JVM's does not), so (defn ok ...) shadows a core name on one host only — measured 2026-07-31. It warns today; per cljgo's static interop scan a bare core-shaped symbol can reject the WHOLE namespace, and a hazard that fires on one host and not the other is the exact thing this port exists to avoid.

A successful ToolResult (SPEC §0.1).

NOT named `ok`: cljgo's clojure.core HAS `ok` and `err` (the JVM's does not),
so `(defn ok ...)` shadows a core name on one host only — measured 2026-07-31.
It warns today; per cljgo's static interop scan a bare core-shaped symbol can
reject the WHOLE namespace, and a hazard that fires on one host and not the
other is the exact thing this port exists to avoid.
sourceraw docstring

toolclj/s

(tool {:keys [name description input-schema source execute]})

Build a Tool. execute takes (args) or (args ctx) and returns a ToolResult.

Build a Tool. `execute` takes (args) or (args ctx) and returns a ToolResult.
sourceraw docstring

tool-namesclj/s

(tool-names tk)

Sorted, always. Two runtimes must not disagree on order — which is why this uses compare-strings and not sort; see there.

Sorted, always. Two runtimes must not disagree on order — which is why this
uses `compare-strings` and not `sort`; see there.
sourceraw docstring

toolkitclj/s

(toolkit tools)
(toolkit tools sources)

A toolkit is {:tools {name -> Tool} :sources {source -> status}}. Later tools win on a name collision, which is how SPEC §0.11's MCP precedence over builtins is expressed: register builtins first, MCP after.

A toolkit is {:tools {name -> Tool} :sources {source -> status}}.
Later tools win on a name collision, which is how SPEC §0.11's MCP precedence
over builtins is expressed: register builtins first, MCP after.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close