Skip to main content
The tools/import endpoint walks an OpenAPI 3.0+ spec or a connector tool manifest, extracts proposed tool definitions, and returns a preview with LLM-inferred class + domain per tool. The preview never auto-commits — you review each entry, then write it to the registry individually. Platform-admin only. The endpoint gates on principal.isAdmin === true.

When to use bulk import

  • Onboarding a new connector — point at the connector’s OpenAPI spec; preview every operation as a candidate tool.
  • Migrating a connector manifest — feed an existing connector manifest YAML through the inference pipeline.
  • Catalog audit — compare a vendor’s OpenAPI against your registry; the response surfaces collisions where the inferred class/domain disagrees with the existing entry.
For a single tool, just use POST /v1/tools directly (the tools registry surface). Bulk import is for batches of 5-500 tools.

Two source formats

OpenAPI 3.0+

The parser walks paths × HTTP methods. For each operation it extracts:
  • name — from operationId (with connector-name prefix derived from info.title), or <method>_<path-slug> fallback.
  • description — from the operation’s description or summary.
  • schema — from requestBody (if present).
  • from_path + from_method — recorded for traceability.
You can also send the spec inline:

Connector YAML

When a connector ships a tool manifest rather than an OpenAPI spec, send it with format: "connector_yaml". The manifest is a top-level connector name plus a tools[] array; each entry carries name, class, domain, and an optional description, display_name, and schema:
  • connector — top-level connector name, recorded as source_connector on every tool in the manifest.
  • name — the tool name; follows the <connector>_<verb>_<noun> pattern.
  • class + domain — if the manifest declares them, they seed the preview; with infer_class_domain: true the LLM still proposes its own and surfaces disagreements in conflicts[]. Omit them and the inference fills them in.
  • schema — optional JSON Schema for the tool’s parameters.

The response

  • imported[] — every extracted tool. Editable preview.
  • inferred_class_domain — same data keyed by tool name, including the model’s confidence (0.0-1.0). Low-confidence inferences (< 0.7) deserve operator override before commit.
  • conflicts[] — names that already exist in the registry with a different class/domain. Resolve before committing.
  • preview_token — opaque token; carry it back to your commit script for traceability.

Class + domain taxonomy

The LLM inference picks from a closed enum. 8 classes: 9 domains: financial / engineering / intelligence / growth / operations / governance / comms / identity / security If the model’s inference doesn’t match your operational classification, override before commit. The taxonomy is documented at mnemom-contracts/tool-manifest/v1.yaml.

Inference cache

Identical (tool_name + method + path + source_connector) tuples return the same inference from cache (7-day TTL). Re-importing the same OpenAPI spec doesn’t re-burn the LLM budget.

Commit each tool individually

The endpoint deliberately doesn’t auto-write. You iterate imported[] and commit each tool via POST /v1/tools:

Safety: SSRF defense

When source: "url", the URL fetch is defended against SSRF:
  • Rejects non-http(s) protocols (no file://, ftp://, etc.).
  • Rejects localhost, 127.0.0.1, 0.0.0.0, ::1.
  • Rejects RFC-1918 private ranges (10.*, 172.16-31.*, 192.168.*).
  • Rejects link-local (169.254.*).
  • Caps fetched body at 4 MiB.
  • 10-second fetch timeout.
Inline bodies cap at 1 MiB.

Size caps + limits

The endpoint consumes the per-principal LLM budget once per tool when infer_class_domain: true. For a 100-tool import, that’s 100 LLM calls (cached on replay).

Common patterns

Connector onboarding

  1. Get the vendor’s OpenAPI spec URL.
  2. Run import with infer_class_domain: true.
  3. Review imported[]; for each tool with confidence < 0.7, set the class + domain manually.
  4. Resolve conflicts[] — accept the new classification, or update the existing registry entry.
  5. Commit each tool via POST /v1/tools.

Re-importing after a vendor update

  1. Re-run import with the new spec URL.
  2. Compare imported[] against existing — conflicts[] calls out changed shapes.
  3. Update existing tools via PATCH /v1/tools/<name> for schema bumps.
  4. Commit new tools via POST /v1/tools.
  • AI helpers — overview of the four AI-forward verbs.
  • Tools registry (GET /v1/tools + POST /v1/tools) — the surface this writes to.
  • mnemom-contracts/tool-manifest — the canonical class + domain taxonomy.