check_code
Scan code for deprecated symbols to get replacements, reasons, and occurrences. Rewrite your code before returning it to avoid using deprecated APIs.
Instructions
ECHO-GUARD FOR CODE (read-only, no LLM): scan a generated snippet and flag every deprecated symbol it
RESURRECTS. Call it on your own output before returning code. Whole-identifier match (foo matches foo(
and x.foo, never foobar); a lexical token scan, not an AST parse. Returns [{symbol, replacement, reason,
occurrences}] for each deprecated symbol the code still uses (empty = clean) so you can rewrite before
emitting. Powered by keyed supersession — records come from deprecate_symbol.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "check_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |