Find GC tables that contain a named string key (structure scan)
find-tables-by-keyScan live Luau GC tables by field name to locate config or stat containers, returning each table, matched key, and sample value.
Instructions
Cheat-Engine-style STRUCTURE scan: walk every live Luau GC table and report each one that contains a string key matching key. This is the complement to search-gc-value (which matches by stored VALUE) — here you match by the NAME of a field, which is ideal when you know a stat/config table exposes a field like 'Coins', 'WalkSpeed', 'GodMode' or 'Config' but you don't yet know the value or the container. For every matching key the tool records { table, matchedKey, sampleValue } where 'table' is the table's address (tostring), 'matchedKey' is the exact key string found, and 'sampleValue' is the encoded current value at that key — so you can immediately see what the field holds. Set contains=true for a substring match on key names (string.find with plain=true). Iteration of each table is pcall-guarded so locked/proxy tables never abort the scan; the number of GC objects examined is capped by maxScan and the result list by limit, with a 'truncated' flag when either cap is hit. Pivot from a hit with read-path-value / write-path-value (using a Luau expression that reaches the container) to read or flip the field. Requires getgc (falls back from getgc(true) to getgc()). Returns { matchCount, scannedObjects, truncated, matches } or { error }. Signature: { key: string, contains: any?, limit: any?, maxScan: any?, threadContext: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client. Produces: bounded-candidates. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The field name to look for as a KEY in GC tables, e.g. 'Coins', 'Health', 'WalkSpeed', 'GodMode', 'Config'. With contains=false (default) only string keys exactly equal to this are matched; with contains=true any string key whose text includes this substring matches (case-sensitive, plain text). | |
| limit | No | Maximum number of matched keys to return (default 100). Hitting this sets truncated=true. | |
| maxScan | No | Maximum number of GC objects to examine before stopping (default 40000). Hitting this sets truncated=true. Raise for a deeper sweep at the cost of time; lower if scans are slow. | |
| contains | No | When true, match any string key that CONTAINS `key` as a plain substring (string.find with plain=true) instead of requiring exact equality. Default false (exact match). Use for fuzzy field discovery. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |