
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
Developers need to include the method and attribute parameters in their MCP queries for Appwrite. Utilize the correct syntax as outlined in the documentation provided at https://appwrite.io/docs/apis/rest#queries-string-format to avoid receiving the `Appwrite Error: Invalid query: Syntax error`.
In the `database_list_documents` function, ensure the query follows the correct format. For example:
```
{
"database_id": "database_id",
"collection_id": "collection_id",
"queries": [
"equal(\"user\",\"user_id\")",
"equal(\"achievement\",\"achievement_id\")",
"limit(
You need to include the method and attribute parameters. Check: https://appwrite.io/docs/apis/rest#queries-string-format
Recommended threads
- No Headers
Hi I have 2 appwrite functions, one is working fine on localhost, second is not even working on prod with https, i inspected the api call, no headers are being ...
- Global Variables
I'm building a Azure DevOps Pipeline Task to deploy my functions to Appwrite using REST APIs. How can I set project global variables via REST? This endpoint do...
- Cannot resolve server
Greetings! Is this a known issue at this time? Cloudflare reports likewise. Please advise, thank you!
