The tools/import endpoint walks an OpenAPI 3.0+ spec or a Polis-style 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 onDocumentation Index
Fetch the complete documentation index at: https://docs.mnemom.ai/llms.txt
Use this file to discover all available pages before exploring further.
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 Polis-style 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.
POST /v1/tools directly (the W1.1 tools registry surface). Bulk import is for batches of 5-500 tools.
Two source formats
OpenAPI 3.0+
paths × HTTP methods. For each operation it extracts:
name— fromoperationId(with connector-name prefix derived frominfo.title), or<method>_<path-slug>fallback.description— from the operation’sdescriptionorsummary.schema— fromrequestBody(if present).from_path+from_method— recorded for traceability.
Polis-style YAML
class / domain declarations. Set "infer_class_domain": false to skip LLM inference entirely.
The response
imported[]— every extracted tool. Editable preview.inferred_class_domain— same data keyed by tool name, including the model’sconfidence(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:| Class | Meaning |
|---|---|
read | Observe only; no state change. |
internal_write | Mutates state inside the calling agent’s org. |
consequential_internal_write | Irreversible internal state change (e.g., delete records). |
consequential_external_write | Irreversible external change (e.g., send invoice, transfer funds). |
comms_internal | Agent-to-org messaging. |
comms_external | Agent-to-external-party messaging. |
engineering_attestation | Proofs of engineering correctness (test runs, deploys). |
governance_write | Policy / role / alignment-card mutations. |
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 iterateimported[] and commit each tool via POST /v1/tools:
Safety: SSRF defense
Whensource: "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.
Size caps + limits
| What | Limit |
|---|---|
| Inline body | 1 MiB |
| URL fetched body | 4 MiB |
| URL fetch timeout | 10 seconds |
| Tools per import (no hard limit; rate limit applies) | ~100 practical |
infer_class_domain: true. For a 100-tool import, that’s 100 LLM calls (cached on replay).
Common patterns
Connector onboarding
- Get the vendor’s OpenAPI spec URL.
- Run import with
infer_class_domain: true. - Review
imported[]; for each tool withconfidence < 0.7, set the class + domain manually. - Resolve
conflicts[]— accept the new classification, or update the existing registry entry. - Commit each tool via
POST /v1/tools.
Re-importing after a vendor update
- Re-run import with the new spec URL.
- Compare
imported[]against existing —conflicts[]calls out changed shapes. - Update existing tools via
PATCH /v1/tools/<name>for schema bumps. - Commit new tools via
POST /v1/tools.
Related reading
- 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.