What?
delete_record
A tool to allow an agent to delete a single record.
Behavior
-
Behaves most like the GraphQL flow
-
Entity permissions are enforced
- Never bypass permissions.
- On violation, return a standard DAB response payload with an error message (e.g.
"You do not have permission to delete this record").
- Do not signal errors via HTTP status codes.
-
Key handling
- Keys use the entity’s mapped aliases.
- Keys are required in the request.
- Keys uniquely identify the record to delete.
- If no record matches the supplied keys, return a DAB error payload (e.g.
"No record found with the given key").
-
Returns the delete result
- Follow the current GraphQL delete behavior.
- Standard response is
{ "status": "okay" } on success.
-
Field handling
- Fields are not valid for this request.
How
Tool method
/// <summary>
/// Deletes a single record from the specified entity.
/// Keys must uniquely identify the record.
/// Returns success or error.
/// </summary>
Task<DabResponse> DeleteRecordAsync(
[Description("The entity name of the record to delete. "
+ "Must match an entity returned by list_entities with delete=true. Required.")]
string entity,
[Description("A dictionary of key/value pairs that uniquely identify the record to delete. "
+ "Keys must match those defined in entity metadata. Required.")]
IDictionary<string, object?> keys);
Parameters
- entity (string, required)
if (string.IsNullOrWhiteSpace(entity))
throw new ArgumentException("Entity is required", nameof(entity));
if (!entityMetadata.Delete)
throw new UnauthorizedAccessException($"Entity {entity} cannot be deleted.");
- keys (IDictionary<string, object?>, required)
if (keys == null || keys.Count == 0)
throw new ArgumentException("Keys are required to delete a record", nameof(keys));
foreach (var key in keys.Keys)
{
if (!entityMetadata.Keys.Contains(key))
throw new ArgumentException($"Invalid key: {key}", nameof(keys));
}
Example call
await DeleteRecordAsync(
entity: "User",
keys: new Dictionary<string, object?> {
{ "Id", 123 }
});
Output payload
This is a standard Data API builder (DAB) payload which includes errors.
Why?
This allows agents to delete existing records.
Configuration
Command line
Add dab configure --runtime.mcp.dml-tools.delete-record.enabled true
What?
delete_record
A tool to allow an agent to delete a single record.
Behavior
Behaves most like the GraphQL flow
Entity permissions are enforced
"You do not have permission to delete this record").Key handling
"No record found with the given key").Returns the delete result
{ "status": "okay" }on success.Field handling
How
delete_recordMCP tool through GraphQL flowruntime.mcp.dml-tools.delete-record.enabled=true)runtime.mcp.dml-tools.delete-record.enabledruntime.mcp.dml-tools.delete-record.enabled=true)dab configure --runtime.mcp.dml-tools.delete-record.enabled truedab validate(warn whendelete-record.enabledand notmcp.enabled)Tool method
Parameters
Example call
Output payload
This is a standard Data API builder (DAB) payload which includes errors.
Why?
This allows agents to delete existing records.
Configuration
Command line
Add
dab configure --runtime.mcp.dml-tools.delete-record.enabled true