Read and write records
List, filter, create, update and delete the records in your app's collections through MCP.
Every record tool takes an entity: the collection name, written exactly as get_schema returns it.
List records#
list_records returns one page of a collection.
{"entity":"Order","filters":{"status":"in:new,paid","price":"between:20,90"},"sort":"-created_date","fields":"id,status,price","limit":50,"page":1}{"items":[],"page":1,"limit":50,"total":0,"pages":0}limitis the number of records per page. The default is 50 and the most is 200.pagestarts at 1.sortis a field name. Put-in front for descending order.fieldsis a comma-separated list of the fields to return.searchis a free-text search.
Filters#
filters maps a field name to a condition. A bare value means "equals". For anything else, write the operator, a colon, and the value.
| Operator | Meaning | Example |
|---|---|---|
eq | Equals | "status": "eq:paid" |
ne | Not equal | "status": "ne:cancelled" |
gt | Greater than | "price": "gt:100" |
gte | Greater than or equal | "price": "gte:100" |
lt | Less than | "price": "lt:100" |
lte | Less than or equal | "price": "lte:100" |
like | Contains | "name": "like:smith" |
in | One of a comma-separated list | "status": "in:new,paid" |
between | Between two values | "price": "between:20,90" |
Count records#
count_records takes the same filters and search as list_records and returns how many records match, without returning them.
Get one record#
get_record returns a single record by id.
Create records#
create_record creates one record. data holds the fields, and it has to match the collection's fields from get_schema. For a relation field, pass the id of the related record.
{"entity":"ContactMessage","data":{"email":"dana@example.com","message":"Hello"}}create_records creates up to 100 records in one call. Pass them as items. The result says which records were created and which failed.
Update a record#
update_record is a partial update: only the fields you send in data change.
Delete a record#
delete_record deletes one record by id. The assistant confirms with you before it calls this tool.