Register Tool
POST /v1/tools
Registers a new tool in the tenant’s MAIP tool registry. Tools represent external capabilities (APIs, functions, services) that machine agents can invoke. Each tool is associated with a required scope, risk level, and optional approval gate.
The platform automatically elevates the risk level to "high" if the tool name or required scope contains dangerous action verbs (write, delete, send, execute, deploy, destroy, drop, truncate).
Tool names must be unique per tenant. Attempting to register a tool with a
name that already exists returns 409 Conflict.
Authentication
Requires X-API-Key header or Bearer JWT token. Tenant-scoped via X-Tenant-ID.
Request Body
Unique machine-readable name for the tool. Used as the identifier in
invocation URLs. Must contain only alphanumeric characters, hyphens,
underscores, and dots. Examples: "search.web", "crm-contact-lookup",
"payment_process".
Human-readable name for the tool, shown in dashboards and approval workflows.
Detailed description of the tool’s functionality, expected inputs, and
outputs.
The permission scope an agent must have to invoke this tool. Uses
resource:action format (e.g., "tool:search.web", "data:write"). The
agent’s scope set is checked against this value at invocation time.
Risk classification for the tool. One of: "low", "medium", "high",
"critical". Default: "medium". Automatically elevated to "high" if the
tool name or scope contains dangerous verbs.
Whether invocations require human approval before execution. Default: false.
Automatically set to true for "critical" risk tools.
Maximum invocations per agent per minute. Default: 60. Range: 1-10000.
Organizational category. Default: "general". Examples: "search",
"communication", "database", "payment", "analytics".
Arbitrary key-value metadata for the tool. Useful for storing endpoint URLs,
auth configuration, schema references, or integration details.
Response
UUID of the newly registered tool.
UUID of the owning tenant.
Machine-readable tool name.
Human-readable tool name.
Required scope for invocation.
Effective risk classification (may be auto-elevated).
Whether human approval is required.
Tool status. Always "active" on creation.
ISO 8601 creation timestamp.
ISO 8601 last-updated timestamp.
Example
curl -X POST https://api.truthlocks.com/v1/tools \
-H "X-API-Key: tl_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "search.web",
"display_name": "Web Search",
"description": "Performs web searches via SerpAPI and returns structured results",
"scope_required": "tool:search.web",
"risk_level": "low",
"rate_limit_per_minute": 30,
"category": "search",
"metadata": {
"endpoint_url": "https://serpapi.com/search",
"auth_type": "api_key",
"max_results": 10
}
}'
Risk Level Auto-Elevation
The platform scans tool names and scope requirements for dangerous action verbs. If detected, the risk level is automatically elevated:
| Detected Verb | Auto-Elevation |
|---|
write, delete, send | Elevated to "high" |
execute, deploy, destroy | Elevated to "high" |
drop, truncate | Elevated to "high" |
Tools with "critical" risk level always require human approval regardless of the requires_approval setting.API key for machine-to-machine authentication
Human-readable tool description
JSON Schema defining the tool input arguments