MySQL JSON Contains
mysql_json_containsLocates database records where a JSON column contains a specified value, with optional path and WHERE filters.
Instructions
Find rows where JSON column contains a specified value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| col | No | Alias for column | |
| sql | No | Alias for where | |
| name | No | Alias for table | |
| path | No | Optional JSON path to search within | |
| limit | No | Maximum rows to return | |
| query | No | Alias for where | |
| rowId | No | Alias for where (used with idColumn) | |
| table | No | Table name (Anti-Hallucination: Pass 'table', not 'tableName') | |
| value | No | Value to search for (Anti-Hallucination: Pass 'value', not 'candidate') | |
| where | No | Optional WHERE clause (Anti-Hallucination: Pass 'where', not 'query' or 'sql') | |
| column | No | JSON column name (Anti-Hallucination: Pass 'column', not 'col') | |
| filter | No | Alias for where | |
| target | No | Alias for value | |
| contains | No | Alias for value | |
| idColumn | No | Alias for where (used with rowId) | |
| candidate | No | Alias for value | |
| condition | No | Alias for where | |
| tableName | No | Alias for table | |
| columnName | No | Alias for column |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Error code (e.g. VALIDATION_ERROR, QUERY_ERROR) | |
| data | No | ||
| error | No | Error message if operation failed | |
| details | No | Additional error context | |
| metrics | No | Token estimation metrics | |
| success | Yes | Whether the operation succeeded | |
| category | No | Error category (validation, query, connection, internal) | |
| suggestion | No | Suggested fix for the error | |
| recoverable | No | Whether the error is recoverable |