Skip to main content
Glama

midnight-review-contract

Read-onlyIdempotent

Reviews Compact smart contracts for security vulnerabilities, privacy issues, logic errors, and best practice violations. Provides severity ratings, suggested fixes, and improved code.

Instructions

🔍 AI-POWERED CONTRACT REVIEW

Performs security review and analysis of Compact smart contracts. Uses the client's LLM to identify issues and suggest improvements.

CHECKS PERFORMED: • Security vulnerabilities • Privacy concerns (shielded state handling) • Logic errors • Best practice violations • Performance issues

OUTPUT INCLUDES: • Summary of contract quality • List of issues with severity levels • Suggested fixes for each issue • Improved code version if applicable

⚠️ REQUIRES: Client with sampling capability (e.g., Claude Desktop)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCompact contract code to review

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
summaryYesSummary of the contract review
issuesYesList of issues found
improvedCodeNoImproved version of the contract if applicable
samplingAvailableYesWhether sampling capability was available
Behavior4/5

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

Annotations declare readOnlyHint, idempotentHint, and openWorldHint. The description adds significant context: it uses the client's LLM, requires sampling capability, and describes the output (summary, issues, fixes, improved code). No contradictions with annotations.

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

Conciseness4/5

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

The description is well-structured with a title, purpose statement, bullet lists, and a requirement note. It is front-loaded with the core purpose. While not overly verbose, it includes some redundancy (e.g., 'AI-Powered' and 'Uses the client's LLM').

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

Completeness5/5

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

Given the presence of output schema (implied by context signals) and annotations covering safety and idempotency, the description is thorough: it explains the tool's purpose, checks, output structure, and a key prerequisite. No gaps are evident.

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 100% with a clear description for the single parameter 'code'. The tool description does not add further information about the parameter beyond mentioning it uses the client's LLM, which is implicit. Baseline 3 is appropriate.

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

Purpose4/5

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

The description clearly states the tool performs security review and analysis of Compact smart contracts, listing specific checks (security, privacy, logic, best practices, performance). However, it does not explicitly differentiate from the sibling 'midnight-analyze-contract', which may have overlapping functionality.

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?

The description specifies a prerequisite (client with sampling capability) and lists the checks performed, giving some context for when to use. However, it does not provide explicit guidance on when not to use or alternatives among sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Olanetsoft/midnight-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server