Skip to main content
Glama

Test two users at once on PostgreSQL

race_two_users

For offline two-user checks, send spec with the supplied schema. Copy the supplied schema into sql. Use github for a known public commit only. For a migration repair, pass corrected_sql as sql and race_spec as spec. A passing repair check can save a summary-only Proof Record.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "race_two_users"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlNoComplete migration SQL, not a database connection string.
specNoRequired for a two-user check. Set format:1, rule, setup:"" if no seed rows, requests:[{statements:[SQL A]},{statements:[SQL B]}], invariant, evidence. Use both operations and the rule from the request. The boolean invariant must hold before and after both operations. Use a migration repair spec as returned by the migration check. Example arguments: {"spec":{"format":1,"rule":"Each slot allows zero or one claim","setup":"","requests":[{"statements":["insert into public.claims values (1) on conflict do nothing"]},{"statements":["insert into public.claims values (1) on conflict do nothing"]}],"invariant":"select count(*) <= 1 from public.claims where slot = 1","evidence":"select slot from public.claims where slot = 1"},"sql":"create table public.claims (slot integer primary key);"}
githubNoOptional source for a known public GitHub commit. Omit when SQL or migration file contents are supplied.
baselineNoOptional proof-card comparison. Pass the original SQL and its matching migration repair spec.
maxOrdersNo
replayTokenNoFrom a previous result. Send the same input including maxOrders.

Output Schema

NameRequiredDescriptionDefault
codeNo
kindNo
ruleNo
proofNo
scopeNo
cappedNo
formatNo
statusNo
fixHintNo
messageNo
witnessNo
completeNo
coverageNo
capReasonNo
finalRowsNo
footprintNo
reportUrlNo
retryAfterNo
ordersTotalNo
ordersTriedNo
replayTokenNo
brokenOrdersNo
ordersBrokenNo
input_requiredNo
user_next_stepNo
proofUnavailableNo
shortestBrokenOrderNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / ordersBroken
      Added value: +{
      +  "type": "integer"
      +}
  2. Changed11 schema fields changed
    • removedInput schema / oneOf
      Removed value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "github"
      -      ]
      -    },
      -    "required": [
      -      "sql"
      -    ]
      -  },
      -  {
      -    "not": {
      -      "required": [
      -        "sql"
      -      ]
      -    },
      -    "required": [
      -      "github"
      -    ]
      -  },
      -  {
      -    "not": {
      -      "anyOf": [
      -        {
      -          "required": [
      -            "sql"
      -          ]
      -        },
      -        {
      -          "required": [
      -            "github"
      -          ]
      -        }
      -      ]
      -    }
      -  }
      -]
    • addedInput schema / properties / baseline
      Added value: +{
      +  "const": true,
      +  "description": "Optional proof-card comparison. Pass the original SQL and its matching migration repair spec.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / github / description
      Added value: +"Optional source for a known public GitHub commit. Omit when SQL or migration file contents are supplied."
    • changedInput schema / properties / github / properties / commit / description
      Previous value: -"Resolved immutable commit SHA; a branch name is refused."New value: +"Exact immutable commit SHA for that repository."
    • changedInput schema / properties / github / properties / url / description
      Previous value: -"https://github.com/owner/repo, public repositories only"New value: +"User-provided public GitHub repository URL"
    • changedInput schema / properties / spec / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "family": {
      -        "enum": [
      -          "counter",
      -          "credits",
      -          "booking",
      -          "invite",
      -          "unique_owner"
      -        ],
      -        "type": "string"
      -      },
      -      "format": {
      -        "const": "migration-fix-v1",
      -        "type": "string"
      -      },
      -      "operation": {
      -        "maxLength": 70,
      -        "type": "string"
      -      },
      -      "source_sha256": {
      -        "pattern": "^[a-f0-9]{64}$",
      -        "type": "string"
      -      },
      -      "table": {
      -        "maxLength": 70,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "format",
      -      "family",
      -      "table",
      -      "source_sha256"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "evidence": {
      -        "description": "Read-only SELECT of the relevant rows.",
      -        "maxLength": 8000,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "format": {
      -        "const": 1,
      -        "type": "integer"
      -      },
      -      "invariant": {
      -        "description": "One SELECT returning the boolean rule that must hold.",
      -        "maxLength": 8000,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "isolation": {
      -        "contains": {
      -          "const": "read committed"
      -        },
      -        "items": {
      -          "enum": [
      -            "read committed",
      -            "repeatable read",
      -            "serializable"
      -          ],
      -          "type": "string"
      -        },
      -        "maxItems": 3,
      -        "minItems": 1,
      -        "type": "array",
      -        "uniqueItems": true
      -      },
      -      "notes": {
      -        "maxLength": 4000,
      -        "type": "string"
      -      },
      -      "requests": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "claims": {
      -              "description": "Synthetic claims only; never credentials or signed JWTs.",
      -              "type": "object"
      -            },
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]{0,15}$",
      -              "type": "string"
      -            },
      -            "role": {
      -              "enum": [
      -                "anon",
      -                "authenticated",
      -                "service_role",
      -                "postgres"
      -              ],
      -              "type": "string"
      -            },
      -            "statements": {
      -              "items": {
      -                "maxLength": 8000,
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              "maxItems": 3,
      -              "minItems": 1,
      -              "type": "array"
      -            }
      -          },
      -          "required": [
      -            "statements"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 2,
      -        "minItems": 2,
      -        "type": "array"
      -      },
      -      "rule": {
      -        "maxLength": 300,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "setup": {
      -        "maxLength": 20000,
      -        "type": "string"
      -      },
      -      "uncertain": {
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "format",
      -      "rule",
      -      "setup",
      -      "requests",
      -      "invariant",
      -      "evidence"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "actors": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "claims": {
      -              "description": "Synthetic JWT claims only, never a signed JWT or real credentials",
      -              "type": "object"
      -            },
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]{0,15}$",
      -              "type": "string"
      -            },
      -            "role": {
      -              "enum": [
      -                "anon",
      -                "authenticated",
      -                "service_role",
      -                "postgres"
      -              ],
      -              "type": "string"
      -            },
      -            "steps": {
      -              "items": {
      -                "anyOf": [
      -                  {
      -                    "maxLength": 8000,
      -                    "minLength": 1,
      -                    "type": "string"
      -                  },
      -                  {
      -                    "additionalProperties": false,
      -                    "properties": {
      -                      "rpc": {
      -                        "additionalProperties": false,
      -                        "properties": {
      -                          "args": {
      -                            "items": {},
      -                            "maxItems": 8,
      -                            "type": "array"
      -                          },
      -                          "function": {
      -                            "pattern": "^[a-z_][a-z_0-9]*\\.[a-z_][a-z_0-9]*$",
      -                            "type": "string"
      -                          }
      -                        },
      -                        "required": [
      -                          "function"
      -                        ],
      -                        "type": "object"
      -                      }
      -                    },
      -                    "required": [
      -                      "rpc"
      -                    ],
      -                    "type": "object"
      -                  }
      -                ]
      -              },
      -              "maxItems": 3,
      -              "minItems": 1,
      -              "type": "array"
      -            },
      -            "userId": {
      -              "description": "Optional synthetic UUID; used as claims.sub",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "role",
      -            "steps"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 3,
      -        "minItems": 2,
      -        "type": "array"
      -      },
      -      "assertion": {
      -        "description": "SELECT returning exactly one non-null boolean that must stay true",
      -        "maxLength": 8000,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "evidence": {
      -        "description": "Read-only SELECT of the relevant rows, preferably with ORDER BY; max 25 returned",
      -        "maxLength": 8000,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "isolation": {
      -        "items": {
      -          "enum": [
      -            "read committed",
      -            "repeatable read",
      -            "serializable"
      -          ],
      -          "type": "string"
      -        },
      -        "maxItems": 3,
      -        "minItems": 1,
      -        "type": "array",
      -        "uniqueItems": true
      -      },
      -      "rule": {
      -        "maxLength": 300,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "setup": {
      -        "maxLength": 20000,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "rule",
      -      "actors",
      -      "assertion",
      -      "evidence"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "evidence": {
      +        "description": "Read-only SELECT of the relevant rows.",
      +        "maxLength": 8000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "format": {
      +        "const": 1,
      +        "type": "integer"
      +      },
      +      "invariant": {
      +        "description": "One SELECT returning the boolean rule that must hold.",
      +        "maxLength": 8000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "isolation": {
      +        "contains": {
      +          "const": "read committed"
      +        },
      +        "items": {
      +          "enum": [
      +            "read committed",
      +            "repeatable read",
      +            "serializable"
      +          ],
      +          "type": "string"
      +        },
      +        "maxItems": 3,
      +        "minItems": 1,
      +        "type": "array",
      +        "uniqueItems": true
      +      },
      +      "notes": {
      +        "maxLength": 4000,
      +        "type": "string"
      +      },
      +      "requests": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "claims": {
      +              "description": "Synthetic claims only; never credentials or signed JWTs.",
      +              "type": "object"
      +            },
      +            "id": {
      +              "pattern": "^[A-Za-z][A-Za-z0-9_]{0,15}$",
      +              "type": "string"
      +            },
      +            "role": {
      +              "enum": [
      +                "anon",
      +                "authenticated",
      +                "service_role",
      +                "postgres"
      +              ],
      +              "type": "string"
      +            },
      +            "statements": {
      +              "items": {
      +                "maxLength": 8000,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "maxItems": 3,
      +              "minItems": 1,
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "statements"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 2,
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "rule": {
      +        "maxLength": 300,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "setup": {
      +        "maxLength": 20000,
      +        "type": "string"
      +      },
      +      "uncertain": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "format",
      +      "rule",
      +      "setup",
      +      "requests",
      +      "invariant",
      +      "evidence"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "family": {
      +        "enum": [
      +          "counter",
      +          "credits",
      +          "booking",
      +          "invite",
      +          "unique_owner"
      +        ],
      +        "type": "string"
      +      },
      +      "format": {
      +        "const": "migration-fix-v1",
      +        "type": "string"
      +      },
      +      "operation": {
      +        "maxLength": 70,
      +        "type": "string"
      +      },
      +      "source_sha256": {
      +        "pattern": "^[a-f0-9]{64}$",
      +        "type": "string"
      +      },
      +      "table": {
      +        "maxLength": 70,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "format",
      +      "family",
      +      "table",
      +      "source_sha256"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "actors": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "claims": {
      +              "description": "Synthetic JWT claims only, never a signed JWT or real credentials",
      +              "type": "object"
      +            },
      +            "id": {
      +              "pattern": "^[A-Za-z][A-Za-z0-9_]{0,15}$",
      +              "type": "string"
      +            },
      +            "role": {
      +              "enum": [
      +                "anon",
      +                "authenticated",
      +                "service_role",
      +                "postgres"
      +              ],
      +              "type": "string"
      +            },
      +            "steps": {
      +              "items": {
      +                "anyOf": [
      +                  {
      +                    "maxLength": 8000,
      +                    "minLength": 1,
      +                    "type": "string"
      +                  },
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "rpc": {
      +                        "additionalProperties": false,
      +                        "properties": {
      +                          "args": {
      +                            "items": {},
      +                            "maxItems": 8,
      +                            "type": "array"
      +                          },
      +                          "function": {
      +                            "pattern": "^[a-z_][a-z_0-9]*\\.[a-z_][a-z_0-9]*$",
      +                            "type": "string"
      +                          }
      +                        },
      +                        "required": [
      +                          "function"
      +                        ],
      +                        "type": "object"
      +                      }
      +                    },
      +                    "required": [
      +                      "rpc"
      +                    ],
      +                    "type": "object"
      +                  }
      +                ]
      +              },
      +              "maxItems": 3,
      +              "minItems": 1,
      +              "type": "array"
      +            },
      +            "userId": {
      +              "description": "Optional synthetic UUID; used as claims.sub",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "role",
      +            "steps"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 3,
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "assertion": {
      +        "description": "SELECT returning exactly one non-null boolean that must stay true",
      +        "maxLength": 8000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "evidence": {
      +        "description": "Read-only SELECT of the relevant rows, preferably with ORDER BY; max 25 returned",
      +        "maxLength": 8000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "isolation": {
      +        "items": {
      +          "enum": [
      +            "read committed",
      +            "repeatable read",
      +            "serializable"
      +          ],
      +          "type": "string"
      +        },
      +        "maxItems": 3,
      +        "minItems": 1,
      +        "type": "array",
      +        "uniqueItems": true
      +      },
      +      "rule": {
      +        "maxLength": 300,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "setup": {
      +        "maxLength": 20000,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "rule",
      +      "actors",
      +      "assertion",
      +      "evidence"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / spec / description
      Added value: +"Required for a two-user check. Set format:1, rule, setup:\"\" if no seed rows, requests:[{statements:[SQL A]},{statements:[SQL B]}], invariant, evidence. Use both operations and the rule from the request. The boolean invariant must hold before and after both operations. Use a migration repair spec as returned by the migration check. Example arguments: {\"spec\":{\"format\":1,\"rule\":\"Each slot allows zero or one claim\",\"setup\":\"\",\"requests\":[{\"statements\":[\"insert into public.claims values (1) on conflict do nothing\"]},{\"statements\":[\"insert into public.claims values (1) on conflict do nothing\"]}],\"invariant\":\"select count(*) <= 1 from public.claims where slot = 1\",\"evidence\":\"select slot from public.claims where slot = 1\"},\"sql\":\"create table public.claims (slot integer primary key);\"}"
    • addedInput schema / properties / spec / type
      Added value: +"object"
    • addedOutput schema / properties / coverage / properties / broken
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / coverage / properties / complete
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / witness
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "steps": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "actor": {
      +            "type": "string"
      +          },
      +          "step": {
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "actor",
      +          "step"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "steps"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / footprint
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "command": {
      +      "description": "Read-only checkout check to run after user approval. It does not install a footprint.",
      +      "type": "string"
      +    },
      +    "guide": {
      +      "format": "uri",
      +      "type": "string"
      +    },
      +    "line": {
      +      "type": "string"
      +    },
      +    "requiresUserApproval": {
      +      "const": true
      +    }
      +  },
      +  "required": [
      +    "line",
      +    "command",
      +    "requiresUserApproval",
      +    "guide"
      +  ],
      +  "type": "object"
      +}
  4. Changed5 schema fields changed
    • changedInput schema / oneOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "github"
      -      ]
      -    },
      -    "required": [
      -      "sql"
      -    ]
      -  },
      -  {
      -    "not": {
      -      "required": [
      -        "sql"
      -      ]
      -    },
      -    "required": [
      -      "github"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "github"
      +      ]
      +    },
      +    "required": [
      +      "sql"
      +    ]
      +  },
      +  {
      +    "not": {
      +      "required": [
      +        "sql"
      +      ]
      +    },
      +    "required": [
      +      "github"
      +    ]
      +  },
      +  {
      +    "not": {
      +      "anyOf": [
      +        {
      +          "required": [
      +            "sql"
      +          ]
      +        },
      +        {
      +          "required": [
      +            "github"
      +          ]
      +        }
      +      ]
      +    }
      +  }
      +]
    • removedInput schema / required
      Removed value: -[
      -  "spec"
      -]
    • addedOutput schema / oneOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "input_required"
      +      ]
      +    },
      +    "required": [
      +      "kind"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "input_required"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / input_required
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "example": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "arguments": {
      +          "type": "object"
      +        },
      +        "name": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "arguments"
      +      ],
      +      "type": "object"
      +    },
      +    "field": {
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "next_step": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "field",
      +    "message",
      +    "example",
      +    "next_step"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "kind"
      -]
  5. Changed2 schema fields changed
    • addedOutput schema / properties / reportUrl
      Added value: +{
      +  "format": "uri",
      +  "type": "string"
      +}
    • addedOutput schema / properties / user_next_step
      Added value: +{
      +  "type": "string"
      +}
  6. Changed1 schema field changed
    • removedOutput schema / properties / nextStep
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "codingAgentTask": {
      -      "type": "string"
      -    },
      -    "label": {
      -      "type": "string"
      -    },
      -    "url": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "label",
      -    "url"
      -  ],
      -  "type": "object"
      -}
  7. Changed5 schema fields changed
    • changedInput schema / properties / spec / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "evidence": {
      -        "description": "Read-only SELECT of the relevant rows.",
      -        "maxLength": 8000,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "format": {
      -        "const": 1,
      -        "type": "integer"
      -      },
      -      "invariant": {
      -        "description": "One SELECT returning the boolean rule that must hold.",
      -        "maxLength": 8000,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "isolation": {
      -        "contains": {
      -          "const": "read committed"
      -        },
      -        "items": {
      -          "enum": [
      -            "read committed",
      -            "repeatable read",
      -            "serializable"
      -          ],
      -          "type": "string"
      -        },
      -        "maxItems": 3,
      -        "minItems": 1,
      -        "type": "array",
      -        "uniqueItems": true
      -      },
      -      "notes": {
      -        "maxLength": 4000,
      -        "type": "string"
      -      },
      -      "requests": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "claims": {
      -              "description": "Synthetic claims only; never credentials or signed JWTs.",
      -              "type": "object"
      -            },
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]{0,15}$",
      -              "type": "string"
      -            },
      -            "role": {
      -              "enum": [
      -                "anon",
      -                "authenticated",
      -                "service_role",
      -                "postgres"
      -              ],
      -              "type": "string"
      -            },
      -            "statements": {
      -              "items": {
      -                "maxLength": 8000,
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              "maxItems": 3,
      -              "minItems": 1,
      -              "type": "array"
      -            }
      -          },
      -          "required": [
      -            "statements"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 2,
      -        "minItems": 2,
      -        "type": "array"
      -      },
      -      "rule": {
      -        "maxLength": 300,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "setup": {
      -        "maxLength": 20000,
      -        "type": "string"
      -      },
      -      "uncertain": {
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "format",
      -      "rule",
      -      "setup",
      -      "requests",
      -      "invariant",
      -      "evidence"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "actors": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "claims": {
      -              "description": "Synthetic JWT claims only, never a signed JWT or real credentials",
      -              "type": "object"
      -            },
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]{0,15}$",
      -              "type": "string"
      -            },
      -            "role": {
      -              "enum": [
      -                "anon",
      -                "authenticated",
      -                "service_role",
      -                "postgres"
      -              ],
      -              "type": "string"
      -            },
      -            "steps": {
      -              "items": {
      -                "anyOf": [
      -                  {
      -                    "maxLength": 8000,
      -                    "minLength": 1,
      -                    "type": "string"
      -                  },
      -                  {
      -                    "additionalProperties": false,
      -                    "properties": {
      -                      "rpc": {
      -                        "additionalProperties": false,
      -                        "properties": {
      -                          "args": {
      -                            "items": {},
      -                            "maxItems": 8,
      -                            "type": "array"
      -                          },
      -                          "function": {
      -                            "pattern": "^[a-z_][a-z_0-9]*\\.[a-z_][a-z_0-9]*$",
      -                            "type": "string"
      -                          }
      -                        },
      -                        "required": [
      -                          "function"
      -                        ],
      -                        "type": "object"
      -                      }
      -                    },
      -                    "required": [
      -                      "rpc"
      -                    ],
      -                    "type": "object"
      -                  }
      -                ]
      -              },
      -              "maxItems": 3,
      -              "minItems": 1,
      -              "type": "array"
      -            },
      -            "userId": {
      -              "description": "Optional synthetic UUID; used as claims.sub",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "role",
      -            "steps"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 3,
      -        "minItems": 2,
      -        "type": "array"
      -      },
      -      "assertion": {
      -        "description": "SELECT returning exactly one non-null boolean that must stay true",
      -        "maxLength": 8000,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "evidence": {
      -        "description": "Read-only SELECT of the relevant rows, preferably with ORDER BY; max 25 returned",
      -        "maxLength": 8000,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "isolation": {
      -        "items": {
      -          "enum": [
      -            "read committed",
      -            "repeatable read",
      -            "serializable"
      -          ],
      -          "type": "string"
      -        },
      -        "maxItems": 3,
      -        "minItems": 1,
      -        "type": "array",
      -        "uniqueItems": true
      -      },
      -      "rule": {
      -        "maxLength": 300,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "setup": {
      -        "maxLength": 20000,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "rule",
      -      "actors",
      -      "assertion",
      -      "evidence"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "family": {
      +        "enum": [
      +          "counter",
      +          "credits",
      +          "booking",
      +          "invite",
      +          "unique_owner"
      +        ],
      +        "type": "string"
      +      },
      +      "format": {
      +        "const": "migration-fix-v1",
      +        "type": "string"
      +      },
      +      "operation": {
      +        "maxLength": 70,
      +        "type": "string"
      +      },
      +      "source_sha256": {
      +        "pattern": "^[a-f0-9]{64}$",
      +        "type": "string"
      +      },
      +      "table": {
      +        "maxLength": 70,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "format",
      +      "family",
      +      "table",
      +      "source_sha256"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "evidence": {
      +        "description": "Read-only SELECT of the relevant rows.",
      +        "maxLength": 8000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "format": {
      +        "const": 1,
      +        "type": "integer"
      +      },
      +      "invariant": {
      +        "description": "One SELECT returning the boolean rule that must hold.",
      +        "maxLength": 8000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "isolation": {
      +        "contains": {
      +          "const": "read committed"
      +        },
      +        "items": {
      +          "enum": [
      +            "read committed",
      +            "repeatable read",
      +            "serializable"
      +          ],
      +          "type": "string"
      +        },
      +        "maxItems": 3,
      +        "minItems": 1,
      +        "type": "array",
      +        "uniqueItems": true
      +      },
      +      "notes": {
      +        "maxLength": 4000,
      +        "type": "string"
      +      },
      +      "requests": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "claims": {
      +              "description": "Synthetic claims only; never credentials or signed JWTs.",
      +              "type": "object"
      +            },
      +            "id": {
      +              "pattern": "^[A-Za-z][A-Za-z0-9_]{0,15}$",
      +              "type": "string"
      +            },
      +            "role": {
      +              "enum": [
      +                "anon",
      +                "authenticated",
      +                "service_role",
      +                "postgres"
      +              ],
      +              "type": "string"
      +            },
      +            "statements": {
      +              "items": {
      +                "maxLength": 8000,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "maxItems": 3,
      +              "minItems": 1,
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "statements"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 2,
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "rule": {
      +        "maxLength": 300,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "setup": {
      +        "maxLength": 20000,
      +        "type": "string"
      +      },
      +      "uncertain": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "format",
      +      "rule",
      +      "setup",
      +      "requests",
      +      "invariant",
      +      "evidence"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "actors": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "claims": {
      +              "description": "Synthetic JWT claims only, never a signed JWT or real credentials",
      +              "type": "object"
      +            },
      +            "id": {
      +              "pattern": "^[A-Za-z][A-Za-z0-9_]{0,15}$",
      +              "type": "string"
      +            },
      +            "role": {
      +              "enum": [
      +                "anon",
      +                "authenticated",
      +                "service_role",
      +                "postgres"
      +              ],
      +              "type": "string"
      +            },
      +            "steps": {
      +              "items": {
      +                "anyOf": [
      +                  {
      +                    "maxLength": 8000,
      +                    "minLength": 1,
      +                    "type": "string"
      +                  },
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "rpc": {
      +                        "additionalProperties": false,
      +                        "properties": {
      +                          "args": {
      +                            "items": {},
      +                            "maxItems": 8,
      +                            "type": "array"
      +                          },
      +                          "function": {
      +                            "pattern": "^[a-z_][a-z_0-9]*\\.[a-z_][a-z_0-9]*$",
      +                            "type": "string"
      +                          }
      +                        },
      +                        "required": [
      +                          "function"
      +                        ],
      +                        "type": "object"
      +                      }
      +                    },
      +                    "required": [
      +                      "rpc"
      +                    ],
      +                    "type": "object"
      +                  }
      +                ]
      +              },
      +              "maxItems": 3,
      +              "minItems": 1,
      +              "type": "array"
      +            },
      +            "userId": {
      +              "description": "Optional synthetic UUID; used as claims.sub",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "role",
      +            "steps"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 3,
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "assertion": {
      +        "description": "SELECT returning exactly one non-null boolean that must stay true",
      +        "maxLength": 8000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "evidence": {
      +        "description": "Read-only SELECT of the relevant rows, preferably with ORDER BY; max 25 returned",
      +        "maxLength": 8000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "isolation": {
      +        "items": {
      +          "enum": [
      +            "read committed",
      +            "repeatable read",
      +            "serializable"
      +          ],
      +          "type": "string"
      +        },
      +        "maxItems": 3,
      +        "minItems": 1,
      +        "type": "array",
      +        "uniqueItems": true
      +      },
      +      "rule": {
      +        "maxLength": 300,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "setup": {
      +        "maxLength": 20000,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "rule",
      +      "actors",
      +      "assertion",
      +      "evidence"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedOutput schema / properties / coverage
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "isolation": {
      +      "type": "string"
      +    },
      +    "ordersTotal": {
      +      "type": "integer"
      +    },
      +    "ordersTried": {
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "ordersTried",
      +    "ordersTotal",
      +    "isolation"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / proof
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "expiresAt": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "url",
      +    "expiresAt"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / proofUnavailable
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / retryAfter
      Added value: +{
      +  "type": "integer"
      +}
  8. Changed5 schema fields changed
    • removedInput schema / properties / spec / additionalProperties
      Removed value: -false
    • addedInput schema / properties / spec / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "evidence": {
      +        "description": "Read-only SELECT of the relevant rows.",
      +        "maxLength": 8000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "format": {
      +        "const": 1,
      +        "type": "integer"
      +      },
      +      "invariant": {
      +        "description": "One SELECT returning the boolean rule that must hold.",
      +        "maxLength": 8000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "isolation": {
      +        "contains": {
      +          "const": "read committed"
      +        },
      +        "items": {
      +          "enum": [
      +            "read committed",
      +            "repeatable read",
      +            "serializable"
      +          ],
      +          "type": "string"
      +        },
      +        "maxItems": 3,
      +        "minItems": 1,
      +        "type": "array",
      +        "uniqueItems": true
      +      },
      +      "notes": {
      +        "maxLength": 4000,
      +        "type": "string"
      +      },
      +      "requests": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "claims": {
      +              "description": "Synthetic claims only; never credentials or signed JWTs.",
      +              "type": "object"
      +            },
      +            "id": {
      +              "pattern": "^[A-Za-z][A-Za-z0-9_]{0,15}$",
      +              "type": "string"
      +            },
      +            "role": {
      +              "enum": [
      +                "anon",
      +                "authenticated",
      +                "service_role",
      +                "postgres"
      +              ],
      +              "type": "string"
      +            },
      +            "statements": {
      +              "items": {
      +                "maxLength": 8000,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "maxItems": 3,
      +              "minItems": 1,
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "statements"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 2,
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "rule": {
      +        "maxLength": 300,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "setup": {
      +        "maxLength": 20000,
      +        "type": "string"
      +      },
      +      "uncertain": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "format",
      +      "rule",
      +      "setup",
      +      "requests",
      +      "invariant",
      +      "evidence"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "actors": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "claims": {
      +              "description": "Synthetic JWT claims only, never a signed JWT or real credentials",
      +              "type": "object"
      +            },
      +            "id": {
      +              "pattern": "^[A-Za-z][A-Za-z0-9_]{0,15}$",
      +              "type": "string"
      +            },
      +            "role": {
      +              "enum": [
      +                "anon",
      +                "authenticated",
      +                "service_role",
      +                "postgres"
      +              ],
      +              "type": "string"
      +            },
      +            "steps": {
      +              "items": {
      +                "anyOf": [
      +                  {
      +                    "maxLength": 8000,
      +                    "minLength": 1,
      +                    "type": "string"
      +                  },
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "rpc": {
      +                        "additionalProperties": false,
      +                        "properties": {
      +                          "args": {
      +                            "items": {},
      +                            "maxItems": 8,
      +                            "type": "array"
      +                          },
      +                          "function": {
      +                            "pattern": "^[a-z_][a-z_0-9]*\\.[a-z_][a-z_0-9]*$",
      +                            "type": "string"
      +                          }
      +                        },
      +                        "required": [
      +                          "function"
      +                        ],
      +                        "type": "object"
      +                      }
      +                    },
      +                    "required": [
      +                      "rpc"
      +                    ],
      +                    "type": "object"
      +                  }
      +                ]
      +              },
      +              "maxItems": 3,
      +              "minItems": 1,
      +              "type": "array"
      +            },
      +            "userId": {
      +              "description": "Optional synthetic UUID; used as claims.sub",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "role",
      +            "steps"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 3,
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "assertion": {
      +        "description": "SELECT returning exactly one non-null boolean that must stay true",
      +        "maxLength": 8000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "evidence": {
      +        "description": "Read-only SELECT of the relevant rows, preferably with ORDER BY; max 25 returned",
      +        "maxLength": 8000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "isolation": {
      +        "items": {
      +          "enum": [
      +            "read committed",
      +            "repeatable read",
      +            "serializable"
      +          ],
      +          "type": "string"
      +        },
      +        "maxItems": 3,
      +        "minItems": 1,
      +        "type": "array",
      +        "uniqueItems": true
      +      },
      +      "rule": {
      +        "maxLength": 300,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "setup": {
      +        "maxLength": 20000,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "rule",
      +      "actors",
      +      "assertion",
      +      "evidence"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / spec / properties
      Removed value: -{
      -  "actors": {
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "claims": {
      -          "description": "Synthetic JWT claims only, never a signed JWT or real credentials",
      -          "type": "object"
      -        },
      -        "id": {
      -          "pattern": "^[A-Za-z][A-Za-z0-9_]{0,15}$",
      -          "type": "string"
      -        },
      -        "role": {
      -          "enum": [
      -            "anon",
      -            "authenticated",
      -            "service_role",
      -            "postgres"
      -          ],
      -          "type": "string"
      -        },
      -        "steps": {
      -          "items": {
      -            "anyOf": [
      -              {
      -                "maxLength": 8000,
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "rpc": {
      -                    "additionalProperties": false,
      -                    "properties": {
      -                      "args": {
      -                        "items": {},
      -                        "maxItems": 8,
      -                        "type": "array"
      -                      },
      -                      "function": {
      -                        "pattern": "^[a-z_][a-z_0-9]*\\.[a-z_][a-z_0-9]*$",
      -                        "type": "string"
      -                      }
      -                    },
      -                    "required": [
      -                      "function"
      -                    ],
      -                    "type": "object"
      -                  }
      -                },
      -                "required": [
      -                  "rpc"
      -                ],
      -                "type": "object"
      -              }
      -            ]
      -          },
      -          "maxItems": 3,
      -          "minItems": 1,
      -          "type": "array"
      -        },
      -        "userId": {
      -          "description": "Optional synthetic UUID; used as claims.sub",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "id",
      -        "role",
      -        "steps"
      -      ],
      -      "type": "object"
      -    },
      -    "maxItems": 3,
      -    "minItems": 2,
      -    "type": "array"
      -  },
      -  "assertion": {
      -    "description": "SELECT returning exactly one non-null boolean that must stay true",
      -    "maxLength": 8000,
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  "evidence": {
      -    "description": "Read-only SELECT of the relevant rows, preferably with ORDER BY; max 25 returned",
      -    "maxLength": 8000,
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  "isolation": {
      -    "items": {
      -      "enum": [
      -        "read committed",
      -        "repeatable read",
      -        "serializable"
      -      ],
      -      "type": "string"
      -    },
      -    "maxItems": 3,
      -    "minItems": 1,
      -    "type": "array",
      -    "uniqueItems": true
      -  },
      -  "rule": {
      -    "maxLength": 300,
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  "setup": {
      -    "maxLength": 20000,
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / spec / required
      Removed value: -[
      -  "rule",
      -  "actors",
      -  "assertion",
      -  "evidence"
      -]
    • removedInput schema / properties / spec / type
      Removed value: -"object"
  9. Added

TDQS

B3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already disclose readOnlyHint=false, destructiveHint=false, openWorldHint=true and idempotentHint=false, so the safety bar is lower. The description adds genuinely new context by calling the checks 'offline' and by revealing a side effect: 'A passing repair check can save a summary-only Proof Record.' What it omits is whether the supplied SQL actually executes against a database, what environment 'offline' means, and how the two request sets are run concurrently.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The text is short, but it opens with a fragment ('For offline two-user checks, send spec with the supplied schema') instead of front-loading the purpose, and 'send spec with the supplied schema' is then effectively restated as 'Copy the supplied schema into sql.' It is dense with instructions but not well sequenced, so key information is scattered.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a complex tool (six parameters, a three-variant nested spec, output schema present), and an output schema means return values need not be explained. Still, for a tool that takes arbitrary migration SQL and two request sets, the description leaves critical gaps: whether the SQL is executed, what 'offline' isolates against, and what a 'Proof Record' is or where it goes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 83%, so the schema already carries most parameter meaning and baseline 3 applies. The description adds mode-level routing (spec + sql for offline checks, github for a known public commit, corrected_sql/race_spec for a repair), but it does not touch baseline, maxOrders, or replayToken, and the phrases 'Copy the supplied schema into sql' and 'corrected_sql'/'race_spec' reference names that do not appear in the schema, which muddies rather than clarifies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gestures at the purpose with 'offline two-user checks' and 'migration repair,' but it never states a clear verb+resource outcome such as 'executes two SQL request sets under separate roles and asserts an invariant.' Most of the text is argument-passing instruction rather than a statement of what the tool does, so an agent must infer the function from the name and title.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It does provide conditional guidance across modes: the supplied spec schema for offline checks, 'Use github for a known public commit only,' and passing corrected_sql/race_spec for a migration repair. However, it never says when to use this tool instead of a sibling like check_supabase_migrations or check_github_repo, and it gives no when-not conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.