
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
- Could not open input file: /usr/src/code...
I updated my selfhosted instance to `1.6.2` and the new service (`appwrite-task-stats-resources`) failed to start. The only log message I see is: ``` Could not ...
- 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...
