Toolnexus.Tool (toolnexus v0.9.4)

Copy Markdown View Source

The uniform tool: a named, described, JSON-Schema'd callable (SPEC §1).

execute is (args :: map, ctx :: Toolnexus.Context.t()) -> Toolnexus.ToolResult.t(). source is one of "mcp" | "skill" | "native" | "http" | "builtin" | "a2a" | "custom".

Summary

Functions

sanitize(x): replace every character outside [a-zA-Z0-9-] with `` (SPEC §0.2).

Types

t()

@type t() :: %Toolnexus.Tool{
  description: String.t(),
  execute: (map(), Toolnexus.Context.t() -> Toolnexus.ToolResult.t()),
  input_schema: map(),
  name: String.t(),
  source: String.t()
}

Functions

sanitize(name)

@spec sanitize(String.t()) :: String.t()

sanitize(x): replace every character outside [a-zA-Z0-9-] with `` (SPEC §0.2).