MCP tools
Every tool the YeshBe MCP server exposes, with its parameters.
Which tools a connected assistant gets depends on the kind of app. An app built in YeshBe gets the data and schema tools. A YeshBe Code project gets the code project tools as well.
Access levels#
Every tool has one of four access levels.
| Access | What it means |
|---|---|
| read | Reads only. Changes nothing. |
| write | Creates or changes something. |
| delete | Deletes something. |
| ask | Changes nothing before you agree in the chat. |
Data and schema tools#
| Tool | Access | What it does |
|---|---|---|
get_schema | read | The app's collections and fields |
list_records | read | List, search and filter records |
count_records | read | Count the records that match |
get_record | read | One record by id |
create_record | write | Create a record |
create_records | write | Create up to 100 records at once |
update_record | write | Change fields of a record |
delete_record | delete | Delete a record |
list_users | read | List the app's users |
get_user | read | One user by id |
create_user | write | Create a user |
update_user | write | Change a user's details |
set_user_active | write | Block or unblock a user |
change_schema | ask | Add, change or remove a collection |
undo_schema_change | write | Put back the schema from before the last change |
In every record tool, entity is the collection name exactly as get_schema returns it.
Schema#
get_schema#
Returns the app's collections with their fields, types, required fields and allowed enum values. Call it before working with records. It takes no parameters.
change_schema#
Adds a collection, changes one, or removes one from the schema. Without apply it returns only the plan: each change with its kind and the records it affects. Records are never deleted. See Change the schema.
collectionobjectThe collection's full new definition: name, properties, required, publicRead and publicCreate.
remove_collectionstringUsed instead of collection. The name of a collection to take out of the schema. Its records stay.
applybooleanfalse, the default, returns only the plan. true makes the change.
user_confirmedbooleantrue only after the user agreed to a breaking or security change.
undo_schema_change#
Puts back the schema from before the last change_schema. Records that were converted stay converted. It takes no parameters.
Records#
list_records#
Lists the records of a collection with paging, search, sort and filters. Returns items, page, limit, total and pages. See Read and write records for the filter operators.
entitystringrequiredfiltersobjectField filters. A value is x for equals, or op:x where op is one of eq, ne, gt, gte, lt, lte, like, in or between.
searchstringFree-text search.
sortstringThe field to sort by. Prefix it with - for descending order.
fieldsstringComma-separated fields to return.
limitintegerRecords per page, up to 200. The default is 50.
pageintegerThe page number. Starts at 1.
get_record#
Returns one record by id.
entitystringrequiredidintegerrequiredcount_records#
Counts the records that match, without returning them.
entitystringrequiredfiltersobjectSame format as in list_records.
searchstringFree-text search.
create_record#
Creates a record.
entitystringrequireddataobjectrequiredThe record's fields. They must match the collection's fields from get_schema. A relation field takes the id of the related record.
create_records#
Creates up to 100 records at once. Returns which were created and which failed.
entitystringrequireditemsarray of objectsrequiredThe records to create. At most 100.
update_record#
Partial update. Only the fields sent in data change.
entitystringrequiredidintegerrequireddataobjectrequiredThe fields to change.
delete_record#
Deletes a record. The assistant confirms with the user before calling it.
entitystringrequiredidintegerrequiredUsers#
list_users#
Lists the app's end users.
searchstringEmail or name.
roleintegerRole id.
activebooleansortstringcreated_at, last_login_at, email, full_name or role. Prefix it with - for descending order.
limitintegerUp to 200.
pageintegerget_user#
Returns one app user.
idintegerrequiredcreate_user#
Creates an app user. Without a password the account can't sign in until a reset.
emailstringrequiredfull_namestringphonestringroleintegerRole id. The default is 1.
passwordstringAt least 8 characters.
extraobjectExtra fields defined by the User collection.
update_user#
Partial update of an app user. Email and password can't be changed here.
idintegerrequiredfull_namestringphonestringroleintegeravatar_urlstringextraobjectExtra fields, merged into the existing ones.
set_user_active#
Blocks or unblocks an app user. Users are never deleted.
idintegerrequiredactivebooleanrequiredfalse blocks the user. true unblocks them.
Code project tools#
A YeshBe Code project gets these tools in addition to the ones above. They work on the project's files and versions.
| Tool | Access | What it does |
|---|---|---|
get_project | read | The project's details |
list_files | read | List the project's files |
read_file | read | Read a file |
search_files | read | Search across the project's files |
write_file | write | Create a file or replace its contents |
write_files | write | Write several files in one call |
upload_file | write | Add a file to the project |
rename | write | Rename or move a file |
delete | delete | Delete a file |
create_draft | write | Start a draft version |
set_home_page | write | Choose the page the site opens on |
set_spa | write | Turn single-page app routing on or off |
get_sdk_docs | read | The SDK documentation for calling the app from code |
get_app_connection | read | The details the project needs to connect to its app |
list_versions | read | List the project's versions |
publish_version | ask | Publish a version to the live site |
publish_version changes nothing before you agree in the chat.