Check if a row exists by primary key; validates value types against the PK column types before querying.
read-onlyany connectionsweeps instancesweeps group
checkKey(schema, table, values)
Check if a row exists by primary key; validates value types against the PK column types before querying.
Also accepts connection, instance, group, described once under arguments every tool takes.
Whether a row with the given key exists. An absent extension or a missing grant is reported as {error, hint} instead.
| Field | Type |
|---|---|
| exists | boolean | null |
A physical replica is byte-identical here, so asking each member of a replication group adds nothing.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "checkKey",
"arguments": {
"schema": "shop",
"table": "orders",
"values": [
482211
]
}
}
}
{
"exists": true
}
Invented values on a fictional shop database, shaped by and checked against this tool's output schema. Real output is returned as structuredContent to clients that negotiate MCP 2025-06-18 or later.
evaluateIndex, duplicateIndexes, tableBloat, indexBloat, explainQuery