
how to user queries with appwrite mcp without getting Appwrite Error: Invalid query: Syntax error
?
database_list_documents function with such query:
TypeScript
{
"database_id": "database_id",
"collection_id": "collection_id",
"queries": [
"equal(\"user\",\"user_id\")",
"equal(\"achievement\",\"achievement_id\")",
"limit(1)"
]
}
returns error
TL;DR
Make sure to include the method and attribute parameters when using queries in Appwrite MCP. Check the correct syntax here: https://appwrite.io/docs/apis/rest#queries-string-format. For the `database_list_documents` function, use a query in the correct format like this:
```
{
"database_id": "database_id",
"collection_id": "collection_id",
"queries": [
"equal('user','user_id')",
"equal('achievement','achievement_id')",
"limit=1"
]
}
```
You need to include the method and attribute parameters. Check: https://appwrite.io/docs/apis/rest#queries-string-format
Recommended threads
- null
- Local function throws EACCES error when ...
I am developing an Appwrite function locally. Up until now, the process has been as smooth as butter: I edit my files, save them, and this triggers a rebuild of...
- Is p-limit compatible with Appwrite?
I have a function that makes asynchronous calls to different Appwrite collections. This is how I make the call: ```js await Promise.allSettled([ ...
