Single Checked Tool Doorway
The one doorway every tool call must pass through for schema validation, freshness checks, and secret redaction.
Malformed arguments crash APIs, stale cached data causes wrong decisions, and raw tool outputs leak API keys.
Every single tool call is schema-checked, authorized, freshness-verified, redacted, and logged in one place.
What It Does (In Plain English)
Agents never call raw JavaScript functions directly. Every tool call passes through Tool Gateway, which validates arguments against JSON Schema, runs all authorization guards, checks data freshness (maxAgeMs), marks external outputs untrusted by default, and scrubs secrets before returning anything to the model.
Real-World Example
- 1Model tries to call
refundwith a negative amount (-50). - 2Tool Gateway validates against the tool’s JSON Schema and immediately rejects it before any API call.
- 3Valid calls proceed through guards, run the tool, redact secrets, and emit
action.completed.
When Should You Turn It On?
Required automatically at Level 1 (review) and above.
Safety level note: Level 1 · Review — Read-only. Can inspect and answer, never changes outside systems.
How to Add It (workspace.yaml)
kits:
- "@neusym/kit-tool-gateway@0.1.0"
kitConfigs:
tool-gateway:
enforceDataContractFreshness: trueKits It Works With
Technical Details & Configuration Options (5 settings)
| Package | @neusym/kit-tool-gateway |
|---|---|
| Provides Ports | tools@1 |
| Requires Ports | None |
| Optional Ports | approvals@1secrets@1 |
| Publishes Events | action.completed |
| Owned DB Collections | None |
Configuration Options (kitConfigs.tool-gateway)
| Setting | Type | Default | Description |
|---|---|---|---|
enforceDataContractFreshness | boolean | true | — |
maxClockSkewMs | integer | 2000 | How far a connector's fetchedAtMs may lie in the future (clock skew) before the payload is quarantined as FUTURE_FETCH_TIMESTAMP. |
declassificationAllowlist | array | [] | Explicitly allowlisted read-effect tool names permitted to declassify untrusted external data via their declared bounded outputSchema. |
maxDeclassifiedStringLength | integer | 256 | Upper bound on maxLength for string fields in declassified tool outputs. |
maxDeclassifiedBytes | integer | 8192 | Maximum serialized UTF-8 byte size of a declassified tool output payload. |