Administration
Retention and lifecycle settings, integrity checks.
Start with: lifecycle_info, lifecycle_set_retention, integrity_check.
3 operations. Discover them from an agent with agentdb_capabilities {"category": "administration"}.
#integrity_check
Dry-run integrity report: every required relationship and the records that lack their link.
- MCP tool
integrity_check- REST
GET /v1/workspaces/{ws}/integrityscope schema:read
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
object | string | Object type name, e.g. contact. | |
workspace | string | Workspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select. |
Example
MCP
{
"tool": "integrity_check",
"arguments": {
"object": "contact"
}
}MCP via agentdb_execute
{
"tool": "agentdb_execute",
"arguments": {
"operation": "integrity_check",
"arguments": {
"object": "contact"
}
}
}REST
curl -s "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/integrity" \
-H "Authorization: Bearer $AGENTDB_TOKEN"#lifecycle_info
Retention (days a deleted record stays restorable), archived and recycle-bin counts per object.
- MCP tool
lifecycle_info- REST
GET /v1/workspaces/{ws}/lifecyclescope schema:read- CLI
agentdb lifecycle info
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
object | string | Object type name, e.g. contact. | |
workspace | string | Workspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select. |
Example
MCP
{
"tool": "lifecycle_info",
"arguments": {
"object": "contact"
}
}MCP via agentdb_execute
{
"tool": "agentdb_execute",
"arguments": {
"operation": "lifecycle_info",
"arguments": {
"object": "contact"
}
}
}REST
curl -s "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/lifecycle" \
-H "Authorization: Bearer $AGENTDB_TOKEN"CLI
agentdb lifecycle info [options] [object]#lifecycle_set_retention
Set how many days deleted records of an object stay in the recycle bin (default 30; 0 = deletes are permanent; null = default). Expired entries are purged automatically.
- MCP tool
lifecycle_set_retention- REST
POST /v1/workspaces/{ws}/lifecycle/retentionscope schema:write
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
object | string | yes | Object type name, e.g. contact. |
retention_days | integer | null | yes | Days to keep archived records before they are purged. null keeps them. |
idempotency_key | string | Optional retry key ([A-Za-z0-9._:-], max 255). Repeating a call with the same key and arguments returns the original result without writing again. | |
workspace | string | Workspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select. |
Example
MCP
{
"tool": "lifecycle_set_retention",
"arguments": {
"object": "contact",
"retention_days": 30
}
}MCP via agentdb_execute
{
"tool": "agentdb_execute",
"arguments": {
"operation": "lifecycle_set_retention",
"arguments": {
"object": "contact",
"retention_days": 30
}
}
}REST
curl -s -X POST "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/lifecycle/retention" \
-H "Authorization: Bearer $AGENTDB_TOKEN" \
-H "Content-Type: application/json" \
-d '{"object":"contact","retention_days":30}'