Skip to main content

Module tools

Module tools 

Source
Expand description

Local-filesystem tools — lightweight executables exposed to agents (e.g. as MCP tools). A tool is either hand-placed under <base_dir>/tools/ or fetched from GitHub via the shared install engine (crate::filesystem::install); install holds the tool side of that pipeline (impl-only, hence pub mod).

Modules§

install
Tool GitHub-install — the tool side of the shared install engine (crate::filesystem::install). Tools are simpler than plugins: a cli_zip bundle plus the manifest, no viewer. These methods are thin wrappers driving the generic engine with tools::Manifest.

Structs§

CliZip
Per-OS cli bundle: the GitHub-release .zip asset filename for each platform. At install time the current platform’s entry (when present) is downloaded and extracted into the cli/ working directory. Local to the CLI’s filesystem layer (the on-disk shape); shared by both the tool and plugin manifests. The cli_zip field itself is required; each per-OS entry is optional — absent means nothing to fetch for that platform (e.g. a hand-placed source-run tool, or a viewer-only plugin).
Exec
Per-OS exec command. Reused from the SDK so the exec shape stays identical across the on-disk manifest and the tools get wire response. Per-OS exec command for a tool. The current platform’s vector is the program plus its leading arguments; the caller’s --args are appended, and the result runs with CWD = the tool’s version folder’s cli/ subdir (objectiveai.json lives in the version folder).
Manifest
Declarative metadata a local tool ships with — the on-disk objectiveai.json at <base_dir>/tools/<owner>/<name>/<version>/objectiveai.json. The CLI reads and writes this shape verbatim; the tools get wire response is a lean projection of it (it drops cli_zip).