midnight-analyze-contract
Analyze contract structure and security patterns through static analysis. Provides structural insights and recommendations without compiling the code.
Instructions
⚠️ STATIC ANALYSIS ONLY - Analyze contract structure and patterns. 🚫 THIS DOES NOT COMPILE THE CONTRACT. Cannot catch: sealed field rules, disclose() requirements, semantic errors. 👉 Use 'midnight-extract-contract-structure' for pre-compilation checks.
Use this for: understanding structure, security pattern analysis, recommendations. NEVER claim a contract 'works' or 'compiles' based on this tool alone.
USAGE GUIDANCE: • Call once per contract - results are deterministic • For security review, also use midnight-review-contract (requires sampling) • Run before making changes, not repeatedly during iteration
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Compact contract source code to analyze | |
| checkSecurity | No | Run security analysis (default: true) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | Summary statistics of the contract | |
| structure | Yes | Contract structure breakdown | |
| securityFindings | Yes | Security analysis findings | |
| recommendations | Yes | Recommendations for improvement |