midnight-get-latest-syntax
Obtain authoritative Compact syntax reference with correct patterns, common mistakes, and type casting rules to prevent hallucination before writing contracts.
Instructions
🚨 CALL THIS BEFORE GENERATING ANY COMPACT CODE! Get the authoritative Compact syntax reference. Prevents hallucination by providing:
Correct syntax patterns (Compact is NOT TypeScript!)
commonMistakes array with wrong→correct mappings
Type casting rules (Uint→Bytes needs two casts)
disclose() requirements for circuit params
Map.lookup()/Set.member() ARE available in circuits
ALWAYS check this reference before writing Compact contracts.
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": "midnight-get-latest-syntax"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Repository name (default: 'compact') |