midnight-mcp
The Midnight MCP server gives AI assistants tools to search, analyze, compile, generate, and manage Midnight blockchain contracts, SDKs, and documentation.
🔍 Search & Discovery
Search Compact smart contract code, TypeScript SDK, and official documentation semantically
Fetch live documentation directly from
docs.midnight.networkExplore 115+ indexed Midnight repositories
🔧 Contract Analysis & Compilation
Static analysis of contract structure, security patterns, and common syntax errors (
analyze-contract,extract-contract-structure)Plain-language explanations of Compact circuits, including ZK proof and privacy implications (
explain-circuit)Real compilation via a hosted service: fast syntax validation (~1–2s) or full ZK circuit generation (~10–30s), with fallback to static analysis (
compile-contract)
🤖 AI-Powered Generation (requires client sampling)
Generate Compact smart contracts from natural language requirements (
generate-contract)Security review for vulnerabilities, logic errors, and best practices (
review-contract)Generate Markdown or JSDoc documentation for contracts (
document-contract)
📁 Repository Access
Retrieve specific files from Midnight repositories, optionally at a specific version or line range (
get-file,get-file-at-version)Browse example contracts and DApps with complexity ratings (
list-examples)Get recent commits and changes across repositories (
get-latest-updates)
📦 Version & Migration
Get version info, release notes, and breaking changes (
get-version-info,check-breaking-changes)Obtain step-by-step migration guides between versions (
get-migration-guide)Diff files between versions and get an authoritative Compact syntax reference to prevent hallucinations (
compare-syntax,get-latest-syntax)
⚡ Compound Tools (token-efficient)
Combined version check + breaking changes + migration guide in one call, ~60% token savings (
upgrade-check)Version info + syntax reference + examples in one call for starting a coding session, ~50% token savings (
get-repo-context)
🩺 Health & Status
Monitor server health, API connectivity, rate limits, and cache statistics (
health-check,get-status)Check if the installed midnight-mcp is up to date against the npm registry (
check-version)
🧭 Tool Discovery
Browse 7 logical tool categories and their tools (
list-tool-categories,list-category-tools)Describe your intent in natural language and get tool recommendations (
suggest-tool)
Provides embedded resources with OpenZeppelin contract templates and documentation for use in Midnight smart contract development.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@midnight-mcpsearch for compact contracts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Midnight MCP Server
⚠️ Deprecated — use Kapa + Midnight Expert
midnight-mcp is being wound down. Midnight has standardised on two official tools:
Kapa MCP (docs Q&A / search):
claude mcp add --transport http midnight https://midnight.mcp.kapa.aiMidnight Expert (hands-on dev, Claude Code plugins):
curl -fsSL https://midnightntwrk.expert/install.sh | bashMigration guide → https://docs.midnight.network/blog/migrating-to-kapa-and-midnight-expert
MCP server that gives AI assistants access to Midnight blockchain—search contracts, analyze code, and explore documentation.
This project extends the Midnight Network with additional developer tooling.
Related MCP server: Solana DeFi Intelligence MCP Server
Requirements
Node.js 20+ (LTS recommended)
Check your version: node --version
If you use nvm, Claude Desktop may not see your nvm-managed Node. Use this config instead:
{
"mcpServers": {
"midnight": {
"command": "/bin/sh",
"args": [
"-c",
"source ~/.nvm/nvm.sh && nvm use 20 >/dev/null 2>&1 && npx -y midnight-mcp@latest"
]
}
}
}Quick Start
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"midnight": {
"command": "npx",
"args": ["-y", "midnight-mcp@latest"]
}
}
}Config file locations:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Cursor
One-click install:
Or manually add to .cursor/mcp.json:
{
"mcpServers": {
"midnight": {
"command": "npx",
"args": ["-y", "midnight-mcp@latest"]
}
}
}VS Code Copilot
Add to .vscode/mcp.json or use Command Palette: MCP: Add Server → "command (stdio)" → npx -y midnight-mcp@latest
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"midnight": {
"command": "npx",
"args": ["-y", "midnight-mcp@latest"]
}
}
}No API keys required. Restart your editor after adding the config.
Why
@latest? Unlike cached npx packages that never auto-update,@latestensures you get new features and fixes on each restart. If upgrading from an older config without@latest, also clear your npx cache:rm -rf ~/.npm/_npx
What's Included
29 Tools
Category | Tools | Description |
Search |
| Semantic search + live docs fetching |
Analysis |
| Static analysis + real compilation |
Repository |
| Access files and examples |
Versioning |
| Version tracking and migration |
AI Generation |
| AI-powered code generation (requires sampling) |
Compound |
| Multi-step operations (saves 50-70% tokens) |
Health |
| Server status and version checking |
Discovery |
| Explore available tools and get recommendations |
All tools are prefixed with midnight- (e.g., midnight-search-compact).
Real Contract Compilation
The midnight-compile-contract tool validates Compact code using a hosted compiler service:
✅ Compilation successful (Compiler v0.29.0) in 2841msFast mode (
skipZk=true): Syntax validation in ~1-2 secondsFull mode (
fullCompile=true): Complete ZK circuit generation in ~10-30 secondsAutomatic fallback: Falls back to static analysis if the compiler service is unavailable
This catches semantic errors that static analysis misses (sealed fields, disclose rules, type mismatches).
MCP Capabilities
Capability | Feature |
Tools | 29 tools with |
Resources | 9 embedded resources with subscription support |
Prompts | 5 workflow prompts |
Logging | Client-controllable log level |
Completions | Autocomplete for prompt arguments |
Progress | Real-time progress for compound tools |
Sampling | AI-powered generation (when client supports it) |
9 Embedded Resources
Quick references available offline:
Compact syntax guide (v0.16-0.21)
SDK API reference
OpenZeppelin contracts
Tokenomics overview
Wallet integration
Common errors & solutions
Static Analysis
extract-contract-structure catches common mistakes before compilation:
Check | Severity | Description |
| P0 | Catches |
| P0 | Catches |
| P0 | Catches old pragma → use |
| P1 | Enums need |
| P0 | Use |
+ 10 more checks | P1-P2 | Overflow, division, assertions, etc. |
5 Prompts
create-contract— Generate new contractsreview-contract— Security and code reviewexplain-concept— Learn Midnight conceptscompare-approaches— Compare implementation patternsdebug-contract— Troubleshoot issues
Indexed Repositories
The API indexes 115+ Midnight repositories from the entire Midnight ecosystem:
Category | Count | Key Repositories |
Compact Language | 6 |
|
SDKs & APIs | 5 |
|
Core Infrastructure | 9 |
|
ZK & Cryptography | 6 |
|
Documentation | 5 |
|
Examples & Templates | 18 |
|
Identity | 5 |
|
Developer Tools | 5 |
|
Solutions & Apps | 7 |
|
Glacier Drop | 15 |
|
Partners & Community | 20 | OpenZeppelin, BrickTowers, MeshJS, PaimaStudios, hackathon winners, Olanetsoft |
Other | 18+ | Contracts, bridges, token distribution, monitoring, QA tools, community projects |
All non-archived repositories from the midnightntwrk organization plus community partners. See api/README.md for the complete list.
Advanced Configuration
HTTP Mode
Run as an HTTP server for web integrations or remote deployment:
# Start HTTP server on port 3000
npx midnight-mcp --http --port 3000Endpoints:
/health- Health check/mcp- Streamable HTTP (MCP protocol)/sse- Server-Sent Events
CLI Options
npx midnight-mcp --help
Options:
--stdio Use stdio transport (default, for Claude Desktop)
--http Use HTTP transport with SSE support
--port <number> HTTP port (default: 3000)
--json Output in JSON (default: YAML for better LLM efficiency)
--github-token GitHub token (overrides GITHUB_TOKEN env var)
-h, --help Show help
-v, --version Show versionWhy YAML by default? YAML is ~20-30% more token-efficient than JSON, which means AI assistants can process more context from tool responses.
Local Mode
Run everything locally for privacy or offline use:
{
"mcpServers": {
"midnight": {
"command": "npx",
"args": ["-y", "midnight-mcp@latest"],
"env": {
"MIDNIGHT_LOCAL": "true",
"OPENAI_API_KEY": "sk-...",
"CHROMA_URL": "http://localhost:8000"
}
}
}
}Requires ChromaDB (docker run -d -p 8000:8000 chromadb/chroma) and OpenAI API key.
GitHub Token
Add "GITHUB_TOKEN": "ghp_..." for higher GitHub API rate limits (60 → 5000 requests/hour).
Developer Setup
git clone https://github.com/Olanetsoft/midnight-mcp.git && cd midnight-mcp
npm install && npm run build && npm test
# Lint & format
npm run lint # ESLint (typescript-eslint)
npm run lint:fix # Auto-fix lint issues
npm run format # PrettierThe hosted API runs on Cloudflare Workers + Vectorize. See api/README.md for backend details.
Links
License
MIT
Stargazers ⭐️
Available Tools
30 toolsmidnight-analyze-contractARead-onlyIdempotent
⚠️ 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
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Compact contract source code to analyze | |
| checkSecurity | No | Run security analysis (default: true) |
Output Schema
| Name | Required | Description |
|---|---|---|
| summary | Yes | Summary statistics of the contract |
| structure | Yes | Contract structure breakdown |
| securityFindings | Yes | Security analysis findings |
| recommendations | Yes | Recommendations for improvement |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint. Description adds crucial behavioral details: it's static analysis only, does not compile, cannot catch certain errors (sealed field rules, disclose() requirements, semantic errors). This exceeds what annotations provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with warnings front-loaded. Slightly wordy (e.g., repeated emphasis on static analysis), but each sentence adds value. Usage guidance is clearly separated. Concise enough for quick scanning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (static analysis with security), the description covers purpose, limitations, usage patterns, and alternatives. Output schema exists, so return values need not be explained. Fully adequate for an agent to decide and invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear descriptions for both parameters (code, checkSecurity). Description does not add parameter-specific semantics beyond the schema, which is sufficient. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it performs static analysis of contract structure and patterns, distinguishing it from sibling tools like 'midnight-extract-contract-structure' (pre-compilation) and 'midnight-review-contract' (security review). It specifies what it does and does not do.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit when-to-use (understanding structure, security pattern analysis) and when-not-to-use (never claim works/compiles). Names alternative tools for other tasks. Gives call frequency guidance (once per contract, before changes).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-auto-update-configARead-onlyIdempotent
⚠️ DEPRECATED: Auto-update is NOT possible because AI agents run in sandboxed environments without access to local filesystems. Instead, tell users to manually update their config to use midnight-mcp@latest, then run: rm -rf ~/.npm/_npx && restart their editor. This tool only returns config file paths for reference.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| instruction | No | |
| platform | No | |
| configPaths | No | |
| searchAndReplace | No | |
| agentInstructions | No | |
| postUpdateMessage | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint and idempotentHint; the description adds that the tool is deprecated, returns paths only, and does not perform updates. This is consistent and provides additional context beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is somewhat lengthy but front-loaded with the crucial deprecation warning. Every sentence adds value, but could be slightly more concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter tool with an output schema, the description fully explains the tool's behavior, deprecation, and usage context. It is complete given the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so baseline is 4. The description does not need to add parameter details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool is deprecated and returns config file paths for reference. It is specific about the verb 'returns' and the resource 'config file paths'. However, the deprecation note might dilute the primary purpose, but it still clarifies what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly tells when not to use the tool (for auto-update) and provides manual steps as an alternative. It also explains why auto-update is not possible in sandboxed environments, giving clear context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-check-breaking-changesARead-only
Check if there are breaking changes between your current version and the latest release. Essential before upgrading dependencies.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name (e.g., 'compact', 'midnight-js') | |
| currentVersion | Yes | Version you're currently using (e.g., 'v1.0.0', '0.5.2') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations provide readOnlyHint and openWorldHint. Description adds minimal behavioral info beyond 'check', which implies no mutation. No contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two efficient sentences, front-loaded with the action, no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given simplicity, good annotations, and complete schema, the description suffices for a check tool. No output schema but action is straightforward.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers both parameters with descriptions (100% coverage). Description does not add extra meaning beyond restating the purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool checks for breaking changes between current and latest release, using a specific verb and resource. It distinguishes from siblings like midnight-check-version.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description says 'Essential before upgrading dependencies', giving clear context for use but not explicitly stating exclusions or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-check-versionARead-onlyIdempotent
🔄 Check if you're running the latest version of midnight-mcp. Compares your installed version against npm registry and provides update instructions if outdated. Use this if tools seem missing or you want to ensure you have the latest features.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| currentVersion | No | Your installed version |
| latestVersion | No | Latest version on npm |
| isUpToDate | No | Whether you have the latest |
| message | No | Status message |
| updateInstructions | No | How to update if outdated |
| newFeatures | No | New features in latest version |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint, so the tool is clearly non-destructive. The description adds behavioral context (comparison against npm registry, providing update instructions) beyond annotations, but does not need to elaborate further.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no fluff. First sentence states purpose, second provides usage context. Every sentence adds value, and key information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Fully complete for a zero-parameter tool with annotations: explains purpose, behavioral context, and when to use. Output schema exists, so return values need not be described.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so the baseline is 4. The description correctly implies no input is needed, matching the empty schema (100% coverage).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool checks version against npm registry and provides update instructions, using specific verb 'check' and resource 'version'. It distinguishes from siblings like `midnight-get-version-info` by emphasizing comparison and update guidance.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit when-to-use: 'if tools seem missing or you want to ensure you have the latest features.' Does not mention when not to use or alternatives, which would elevate to 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-compare-syntaxARead-onlyIdempotent
Compare a file between two versions to see what changed. Use this before recommending code patterns to ensure they work with the user's version.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name (e.g., 'compact') | |
| path | Yes | File path to compare | |
| oldVersion | Yes | Old version tag (e.g., 'v0.9.0') | |
| newVersion | No | New version tag (default: latest stable) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=true, establishing safety profile. Description adds minimal behavioral context (what 'compare' means) but does not contradict annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, direct and relevant, with no unnecessary words. Front-loaded with actionable information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given simple tool with 4 parameters, no output schema, and strong annotations, description adequately covers purpose and usage context. Could mention output format but not necessary for this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema documents all 4 parameters with 100% coverage. Description adds no additional semantic meaning beyond the schema and the overall purpose of comparing versions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool compares a file between two versions, using specific verbs and resource. It distinguishes from sibling tools like midnight-get-file-at-version which only retrieves a file.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description explicitly advises using this before recommending code patterns to ensure version compatibility. It provides clear context for when to use, though does not mention when not to use or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-compile-contractARead-onlyIdempotent
🔧 REAL COMPILATION - Compile Compact code using the hosted compiler service.
Unlike static analysis tools, this ACTUALLY COMPILES the contract and returns real compiler errors.
Use this to: • Validate that generated code compiles before showing to users • Get actual compiler error messages with line numbers • Check if a contract is syntactically and semantically correct
Options: • skipZk=true (default): Fast syntax validation only (~1-2s) • fullCompile=true: Full compilation with ZK circuit generation (~10-30s)
FALLBACK BEHAVIOR: • If the compiler service is unavailable, automatically falls back to static analysis • Check 'validationType' in response: 'compiler' = real compilation, 'static-analysis-fallback' = fallback mode • Fallback provides structure/security analysis but may miss semantic errors
USAGE GUIDANCE: • Call after generating or modifying Compact code • Use skipZk=true for quick validation during development • Use fullCompile=true for final validation before deployment
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Compact contract source code to compile | |
| skipZk | No | Skip ZK circuit generation for faster syntax-only validation (default: true) | |
| fullCompile | No | Perform full compilation including ZK generation (slower but complete) |
Output Schema
| Name | Required | Description |
|---|---|---|
| success | Yes | Whether compilation/validation succeeded |
| message | Yes | Human-readable status message |
| validationType | Yes | Type of validation performed - compiler (real) or static-analysis-fallback (when service unavailable) |
| compilerVersion | No | Version of the Compact compiler used (if available) |
| compilationMode | No | Type of compilation performed |
| output | No | |
| warnings | No | Compiler warnings or fallback warnings |
| error | No | Error code if compilation failed |
| location | No | Location of error if applicable |
| hint | No | Helpful hint for resolving the issue |
| serviceUrl | No | URL of the compiler service used |
| serviceAvailable | No | Whether the compiler service is available |
| fallbackReason | No | Reason for falling back to static analysis (if applicable) |
| staticAnalysis | No | Static analysis results (only present when using fallback) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Goes well beyond annotations by detailing fallback to static analysis, explaining response field validationType, and providing time estimates for compilation modes. Aligns with readOnlyHint and idempotentHint, no contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with sections, bullet points, and emojis. Each sentence provides distinct value. Slightly verbose but not wasteful; could be tightened slightly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers purpose, usage guidance, parameter behavior, fallback, and response interpretation. With output schema present, return values don't need explanation. Complete for a compilation tool with moderate complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline 3. Description adds practical context: time estimates for skipZk vs fullCompile, default behavior, and fallback implications for parameters. Adds value beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it compiles Compact code using a hosted compiler service, distinguishing itself from static analysis tools like midnight-analyze-contract. The emphasis on 'REAL COMPILATION' and 'returns real compiler errors' makes its purpose explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear when to use (after generating/modifying code, for validation), when to use each option (skipZk for quick validation, fullCompile for final checks), and explains fallback behavior when service is unavailable. Implicitly contrasts with static analysis tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-document-contractARead-onlyIdempotent
📝 AI-POWERED DOCUMENTATION GENERATION
Generates comprehensive documentation for Compact smart contracts. Uses the client's LLM to create detailed, human-readable docs.
FORMATS: • markdown - Full Markdown documentation with examples • jsdoc - JSDoc-style inline comments
MARKDOWN INCLUDES: • Contract overview and purpose • State variables with privacy annotations • Circuit function documentation • Witness function documentation • Usage examples • Security considerations
⚠️ REQUIRES: Client with sampling capability (e.g., Claude Desktop)
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Compact contract code to document | |
| format | No | Documentation format (default: markdown) |
Output Schema
| Name | Required | Description |
|---|---|---|
| documentation | Yes | Generated documentation |
| format | Yes | Format of the documentation |
| samplingAvailable | Yes | Whether sampling capability was available |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare read-only and idempotent hints. Description adds valuable context: uses client's LLM, requires sampling capability, and warns about side-effect (documentation generation). No contradiction. Minor deduction for not detailing other behavioral aspects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with bullet points and formatting, but slightly verbose (emoji, heavy bold). Could be trimmed without losing information. Front-loaded with key purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given output schema exists (not shown but signaled), description doesn't need to cover return values. It covers input requirements, format options, and output contents. Missing error handling or rate limits, but acceptable for this tool type.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 100% coverage with brief descriptions. Description adds meaning by detailing what markdown includes (sections like contract overview, examples) and that jsdoc is inline comments. This informs agent about output content, adding value beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it generates comprehensive documentation for Compact smart contracts, specifies formats (markdown, jsdoc) and lists contents. This verb-resource pair is distinct from sibling tools like midnight-explain-circuit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states requirement for client sampling capability (e.g., Claude Desktop), guiding when to use. However, it doesn't contrast with alternatives or state when not to use, so slight deduction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-explain-circuitARead-onlyIdempotent
Explain what a specific Compact circuit does in plain language, including its zero-knowledge proof implications and privacy considerations.
USAGE GUIDANCE: • Call once per circuit - explanations are deterministic • Provide complete circuit code including parameters and body • For full contract analysis, use midnight-analyze-contract first
| Name | Required | Description | Default |
|---|---|---|---|
| circuitCode | Yes | Circuit definition from Compact to explain |
Output Schema
| Name | Required | Description |
|---|---|---|
| circuitName | Yes | Circuit name |
| isPublic | No | Whether it's exported |
| parameters | No | Circuit parameters |
| returnType | No | Return type |
| explanation | Yes | Plain language explanation |
| operations | No | Operations performed by the circuit |
| zkImplications | Yes | Zero-knowledge proof implications |
| privacyConsiderations | Yes | Privacy-related considerations |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate idempotent and read-only; description adds that explanations are deterministic and specifies content (ZK implications, privacy). Adds value beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Compact with a clear main sentence and three bullet points. No redundant information; front-loaded with purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given one parameter, annotations, and output schema existence, description is complete. Explains what tool does, how to use it, and its deterministic nature.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema provides description for circuitCode; description adds usage nuance (provide complete code including parameters and body). Schema coverage is 100%.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool explains a Compact circuit in plain language including ZK implications and privacy. Differentiates from sibling midnight-analyze-contract by specifying scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit usage guidance: call once per circuit, provide complete code, and recommends using midnight-analyze-contract for full contract analysis.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-extract-contract-structureARead-onlyIdempotent
Extract and analyze Compact contract structure (circuits, witnesses, ledger). CRITICAL CHECKS: deprecated 'ledger { }' block syntax, 'Void' return type (should be []), old pragma format, unexported enums, deprecated Cell wrapper. Also detects: module-level const, stdlib name collisions, division operator, Counter.value access, missing disclose() calls, potential overflow. Use BEFORE generating contracts to catch syntax errors. Note: Static analysis only - catches common patterns but not semantic errors.
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | The Compact contract source code to analyze (provide this OR filePath) | |
| filePath | No | Path to a .compact file to analyze (alternative to providing code directly) |
Output Schema
| Name | Required | Description |
|---|---|---|
| success | No | |
| filename | No | |
| languageVersion | No | |
| imports | No | |
| structure | No | |
| exports | No | Names of all exported items |
| stats | No | Counts of each type of definition |
| potentialIssues | No | Common issues detected by static analysis |
| summary | No | |
| message | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true. The description adds significant behavioral context: it performs static analysis only, catches common patterns but not semantic errors, and lists specific checks and limitations. 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured, starting with the main purpose, then critical checks, additional checks, usage guidance, and a note. It is front-loaded and every sentence adds value, though it could be slightly more concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists, the description does not need to explain return values. It covers the tool's purpose, checks, limitations, and usage context. Error behavior is not addressed, but overall it is comprehensive for a static analysis tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with both parameters described. The description does not add new meaning beyond the schema; it repeats the OR relationship. With high schema coverage, baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool extracts and analyzes Compact contract structure with specific checks listed. It uses a specific verb and resource, but there is a sibling 'midnight-analyze-contract' that could overlap, and the description does not explicitly differentiate from it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description advises using the tool before generating contracts to catch syntax errors, providing when-to-use guidance. However, it does not mention when not to use or explicitly compare to alternative tools, such as 'midnight-analyze-contract' or compile tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-fetch-docsARead-onlyIdempotent
🌐 LIVE FETCH: Retrieve latest documentation directly from docs.midnight.network (SSG-enabled).
Unlike midnight-search-docs which uses pre-indexed content, this tool fetches LIVE documentation pages in real-time. Use when you need: • The absolute latest content (just updated docs) • A specific page you know the path to • Full page content rather than search snippets
COMMON PATHS: • /develop/faq - Frequently asked questions • /getting-started/installation - Installation guide • /getting-started/create-mn-app - Create an MN app • /compact - Compact language reference • /develop/tutorial/building - Build guide • /develop/reference/midnight-api - API documentation • /learn/what-is-midnight - What is Midnight • /blog - Dev diaries
USAGE GUIDANCE: • Use extractSection to get only a specific heading (e.g., "Developer questions") • Prefer midnight-search-docs for discovery, use this for known pages • Content is truncated at 15KB for token efficiency
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Documentation page path (e.g., '/develop/faq', '/getting-started/installation') | |
| extractSection | No | Optional: Extract only a specific section by heading text |
Output Schema
| Name | Required | Description |
|---|---|---|
| title | Yes | Page title |
| path | Yes | Normalized path |
| url | No | Full URL |
| content | Yes | Extracted page content |
| headings | No | Page headings/table of contents |
| lastUpdated | No | Last update timestamp |
| truncated | No | Whether content was truncated |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint, idempotentHint, openWorldHint are true. Description adds useful behavioral context beyond annotations: content is truncated at 15KB for token efficiency, and it's a live fetch. 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is well-structured with sections (common paths, usage guidance), and front-loaded with purpose. However, the list of common paths makes it slightly verbose; could be trimmed without losing value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity, presence of output schema, and rich annotations, the description is complete. It explains function, limitations (15KB truncation), distinguishes from sibling, and provides usage context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Description adds value beyond schema by listing common paths and providing usage guidance for the extractSection parameter, which helps the agent use parameters correctly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches live documentation from docs.midnight.network, with a specific verb ('fetch') and resource ('docs'). It distinguishes itself from the sibling midnight-search-docs by emphasizing real-time fetching vs pre-indexed content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit guidance on when to use this tool versus midnight-search-docs (discovery vs known pages). Lists specific use cases like latest content, specific page, and full page content. Also offers usage guidance for extractSection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-generate-contractA
🔮 AI-POWERED CONTRACT GENERATION
Generates Compact smart contracts from natural language requirements. Uses the client's LLM through MCP sampling to create contracts.
REQUIREMENTS FORMAT:
Describe what the contract should do
Specify state variables needed
Define access control requirements
List the operations/circuits needed
CONTRACT TYPES: • counter - Simple counter with increment/decrement • token - Token with transfers and balances • voting - Voting/governance mechanisms • custom - Free-form custom contract
EXAMPLE USAGE: "Create a token contract with private balances, mint/burn capabilities for admin, and transfer functionality between users"
⚠️ REQUIRES: Client with sampling capability (e.g., Claude Desktop)
| Name | Required | Description | Default |
|---|---|---|---|
| requirements | Yes | Natural language description of the contract requirements | |
| contractType | No | Type of contract to generate | |
| baseExample | No | Example contract code to use as a base |
Output Schema
| Name | Required | Description |
|---|---|---|
| code | Yes | Generated Compact contract code |
| explanation | Yes | Brief explanation of what the contract does |
| warnings | Yes | Any warnings or notes about the generated code |
| samplingAvailable | Yes | Whether sampling capability was available |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds significant behavioral context beyond annotations: it uses the client's LLM through MCP sampling, requires sampling capability, and warns about prerequisites. It does not contradict annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (REQUIREMENTS FORMAT, CONTRACT TYPES, EXAMPLE USAGE, ⚠️ REQUIRES). Every sentence is informative and earns its place, though slightly lengthy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity and presence of output schema, the description covers requirements format, contract types, example, and prerequisites. It is sufficiently complete for an AI agent to understand and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema coverage, baseline is 3. The description adds value by explaining contract types, requirements format, and providing an example, which aids in understanding parameter usage beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Generates Compact smart contracts from natural language requirements.' It uses a specific verb ('Generates') and resource ('Compact smart contracts'), and distinguishes from sibling tools like midnight-analyze-contract or midnight-review-contract by focusing on generation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides clear context on when to use (natural language requirements), but lacks explicit guidance on when not to use or alternatives. It does mention required client capability and gives example usage, but does not compare to other sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-get-fileARead-only
Retrieve a specific file from Midnight repositories. Use repository aliases like 'compact', 'midnight-js', 'counter', or 'bboard' for convenience.
USAGE GUIDANCE: • Use midnight-list-examples first if you're unsure which file to get • For searching across files, use midnight-search-* tools instead • Use 'ref' parameter to get specific versions (branch, tag, or commit) • Use startLine/endLine to request specific sections of large files • Files >50KB are truncated (first 25KB + last 25KB preserved)
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name (e.g., 'compact', 'midnight-js', 'example-counter') | |
| path | Yes | File path within repository | |
| ref | No | Branch, tag, or commit SHA (default: main) | |
| startLine | No | Start line number (1-based, inclusive). Use to request specific sections. | |
| endLine | No | End line number (1-based, inclusive). Use with startLine for a range. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true, indicating a safe read operation. The description adds behavioral context beyond annotations, such as file truncation at 50KB (first 25KB + last 25KB preserved) and the ability to request specific line ranges, which helps the agent understand how the tool behaves.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, using a single introductory sentence followed by a bulleted list of usage guidance. Every sentence adds value, and the structure is front-loaded with the core purpose. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (5 parameters, file retrieval with truncation) and no output schema, the description adequately covers return behavior (truncation), versioning (ref), and partial file retrieval (startLine/endLine). It could mention the format of the file content returned, but overall it's sufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage with descriptions for all 5 parameters. The description adds value by explaining repository aliases ('compact', 'midnight-js', etc.) and clarifying the default value for 'ref' (main). It also offsets any ambiguity in schema descriptions by providing usage context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with a clear verb+resource: 'Retrieve a specific file from Midnight repositories.' It distinguishes itself from sibling tools by mentioning alternatives like midnight-list-examples and midnight-search-*, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The 'USAGE GUIDANCE' section explicitly states when to use alternatives ('Use midnight-list-examples first if you're unsure which file to get', 'For searching across files, use midnight-search-* tools instead') and provides clear guidance on parameters like ref, startLine/endLine, and file truncation behavior.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-get-file-at-versionARead-onlyIdempotent
Get the exact content of a file at a specific version. CRITICAL: Use this to ensure code recommendations match the user's version. Always prefer this over get-file when version accuracy matters.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name (e.g., 'compact', 'midnight-js') | |
| path | Yes | File path within repository | |
| version | Yes | Version tag (e.g., 'v1.0.0') or branch (e.g., 'main') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the description does not need to restate these. The description adds context about ensuring recommendations match the user's version, which is helpful but does not disclose potential failure modes, caching, or version resolution details. Minimal addition beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences: purpose, critical note, and preference directive. Every sentence adds distinct value, and the purpose is front-loaded. No wasted words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the core purpose and usage context but lacks details about the return format, error behavior (e.g., version not found), and edge cases. Given no output schema, additional output description would improve completeness. Annotations partially compensate for safety context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema covers all three parameters with descriptions (100% coverage). The tool description does not add any parameter-specific meaning beyond the schema. According to guidelines, baseline is 3 for high coverage, and no extra value is provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets the exact content of a file at a specific version, and explicitly distinguishes it from the sibling 'midnight-get-file' by emphasizing version accuracy. The verb 'get' and resource 'file at a version' are specific, and the critical note reinforces the unique value.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says to prefer this over 'get-file' when version accuracy matters, providing clear guidance on when to use this tool. It does not explicitly state when not to use it, but the preference directive implies alternatives. Could be more comprehensive with exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-get-latest-syntaxARead-only
🚨 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.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Repository name (default: 'compact') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true and openWorldHint=true. Description adds behavioral context: it prevents hallucination, provides authoritative syntax, and lists specific outputs. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is front-loaded with a strong call to action but is somewhat verbose with emojis and capital letters. Bullet points add structure, but some content could be more concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, but description enumerates what the tool provides (syntax patterns, commonMistakes, type casting rules, etc.), which is sufficiently complete for a reference tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% as the single optional param 'repo' is described with default. Description does not add any additional meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool provides the authoritative Compact syntax reference, with specific items like syntax patterns, commonMistakes, and type casting rules. Distinguishes from siblings like midnight-compare-syntax by focusing on latest authoritative reference.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly instructs to 'CALL THIS BEFORE GENERATING ANY COMPACT CODE!' and 'ALWAYS check this reference before writing Compact contracts.' Provides clear when-to-use guidance with no ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-get-latest-updatesBRead-only
Retrieve recent changes and commits across Midnight repositories. Useful for staying up-to-date with the latest developments.
| Name | Required | Description | Default |
|---|---|---|---|
| since | No | ISO date to fetch updates from (default: last 7 days) | |
| repos | No | Specific repos to check (default: all configured repos) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
ReadOnlyHint already signals no side effects. Description adds 'across Midnight repositories' context but no additional behavioral traits (e.g., rate limits, pagination). No contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the action. The second sentence adds minor utility but does not waste space.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple read tool with annotations. Lacks details on return format or ordering, but no output schema exists to compensate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear parameter descriptions. Description does not add extra meaning beyond schema. Baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states 'Retrieve recent changes and commits across Midnight repositories' with a clear verb and resource. It distinguishes from siblings like midnight-get-file or midnight-get-latest-syntax, though no explicit differentiation is provided.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Says 'Useful for staying up-to-date' but provides no when-to-use, when-not-to-use, or alternatives. Given many sibling tools, agent lacks guidance on selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-get-migration-guideARead-only
Get a detailed migration guide for upgrading between versions, including all breaking changes, deprecations, and recommended steps.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name (e.g., 'compact', 'midnight-js') | |
| fromVersion | Yes | Version you're migrating from | |
| toVersion | No | Target version (default: latest stable) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true, covering safety and scope. The description adds content details but no additional behavioral traits like potential network calls or response size. It does not contradict annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that front-loads the action and resource. Every word contributes value without redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description adequately covers tool purpose and output content. However, given no output schema and the complexity of migration guides, it could mention format, size expectations, or prerequisites for completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage for parameters is 100%, with each parameter already described. The tool description does not add further meaning beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves a migration guide for version upgrades, specifying content (breaking changes, deprecations, steps). It effectively distinguishes from sibling tools like midnight-check-breaking-changes which only check for changes, not provide a full guide.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide any guidance on when to use this tool versus alternatives. With many siblings performing related but different checks, agents would benefit from explicit usage context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-get-repo-contextARead-only
🚀 COMPOUND TOOL: Get everything needed to start working with a repository in ONE call. Combines version info + syntax reference + relevant examples. Use this at the start of a coding session instead of multiple individual calls. Saves ~50% tokens.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name (e.g., 'compact', 'midnight-js') | |
| includeExamples | No | Include example code snippets (default: true) | |
| includeSyntax | No | Include syntax reference (default: true) |
Output Schema
| Name | Required | Description |
|---|---|---|
| repository | No | Full repository path |
| quickStart | No | Version and install command |
| version | No | Version details |
| syntax | No | Syntax reference summary |
| examples | No | Relevant examples |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true. Description adds value by revealing compound nature, internal combination of calls, and token efficiency. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two efficient sentences with emoji and bold label for impact. Front-loaded purpose, followed by usage guidance. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With output schema, full parameter coverage, and annotations, the description fills remaining gaps: compound nature, optimal usage timing, and token savings. Fully complete for the tool's moderate complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with parameter descriptions. Description adds context by linking boolean parameters to parts of the compound result (examples, syntax), enhancing meaning beyond schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool gets all repository context in one call, specifying what it combines (version info, syntax, examples). Distinguished from sibling tools like midnight-get-version-info and midnight-list-examples.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly recommends use at the start of a coding session to replace multiple calls and highlights token savings. Does not specify when not to use, but context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-get-statusARead-onlyIdempotent
Get current server status including rate limits and cache statistics. Quick status check without external API calls.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| server | Yes | Server name |
| status | Yes | Running status |
| timestamp | Yes | ISO timestamp |
| rateLimit | No | |
| cache | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint. Description adds specific details about what is included (rate limits, cache statistics) and that it requires no external calls, adding value beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with action, no wasted words. Each sentence serves a clear purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and presence of output schema and annotations, the description adequately covers what the tool does and its lightweight nature. No gaps identified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so schema coverage is 100%. Description does not need to add param info; baseline for 0 params is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states it gets current server status with specific items (rate limits, cache stats). Clearly distinguishes from sibling tools which deal with contracts, compilation, updates, etc.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Mentions 'quick status check without external API calls,' implying lightweight use case. No explicit when-not or alternatives but contextually clear among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-get-update-instructionsARead-onlyIdempotent
📋 Get detailed, platform-specific instructions for updating Midnight MCP to the latest version. Provides step-by-step guidance including config file locations, commands to run, and troubleshooting tips. Use this when a user needs help updating or is having issues with outdated versions.
| Name | Required | Description | Default |
|---|---|---|---|
| platform | No | Target platform (auto-detects if not specified) | auto |
| editor | No | Target editor (defaults to Claude Desktop) | auto |
Output Schema
| Name | Required | Description |
|---|---|---|
| title | No | |
| currentSetup | No | |
| steps | No | |
| troubleshooting | No | |
| exampleConfig | No | |
| helpfulLinks | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint and idempotentHint, so the description's job is to add context. It does so by detailing the type of instructions (step-by-step, config locations, troubleshooting) without contradicting annotations. No annotation contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no wasted words. Front-loaded with the core action. Emoji adds visual cue. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 optional params, output schema exists), the description is complete. It covers what the tool does, when to use it, and what it provides. No additional information is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but description adds value by clarifying default behavior for 'platform' (auto-detects) and 'editor' (defaults to Claude Desktop), which is not in schema. Thus, it enriches parameter meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool's purpose: retrieving detailed, platform-specific update instructions for Midnight MCP. Includes specifics like config file locations, commands, and troubleshooting. Distinguishes from siblings like midnight-check-version and midnight-get-latest-updates.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Use this when a user needs help updating or is having issues with outdated versions.' Provides clear context for use. Does not explicitly mention when not to use or name alternatives, but the context is sufficient for an AI agent to infer appropriate usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-get-version-infoARead-only
Get the latest version, release notes, and recent breaking changes for a Midnight repository. Use this to ensure you're working with the latest implementation.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name (e.g., 'compact', 'midnight-js', 'sdk') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint=true and openWorldHint=true, indicating a safe read operation. The description does not add further behavioral details beyond what annotations convey, so it carries its burden minimally.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with action and purpose, with no redundant information. Every word serves a purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with one well-documented parameter and annotations, the description fully covers what the tool does and why to use it. No missing critical information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers 100% of the parameter with a clear description. The description adds no additional meaning beyond the schema, meeting the baseline but not exceeding it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Describes a specific action: retrieving the latest version, release notes, and recent breaking changes for a Midnight repository. Clearly distinguishes from sibling tools that focus on individual aspects like midnight-check-version or midnight-check-breaking-changes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
States when to use it ('ensure you're working with the latest implementation'), but does not explicitly mention when not to use or suggest alternative tools. The context is clear but lacks exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-health-checkARead-onlyIdempotent
Check the health status of the Midnight MCP server. Returns server status, API connectivity, and resource availability.
| Name | Required | Description | Default |
|---|---|---|---|
| detailed | No | Include detailed checks including GitHub API and vector store status (slower) |
Output Schema
| Name | Required | Description |
|---|---|---|
| status | Yes | Overall health status |
| version | No | Server version |
| rateLimit | No | |
| cacheStats | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint, indicating safe repeated calls. The description adds behavioral context by specifying what the health check returns (server status, API connectivity, resource availability). No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the purpose, and contains no unnecessary information. Each word adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple health check with one optional parameter and an output schema, the description is fully adequate. It covers what the tool does and what it returns, and the annotations cover safety.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the input schema fully documents the 'detailed' parameter. The tool description does not add new meaning beyond the schema's parameter description, thus baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool checks health status of the Midnight MCP server and lists return components (server status, API connectivity, resource availability). However, it does not explicitly differentiate it from sibling tool midnight-get-status, leaving potential ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context (when server health is needed) but provides no explicit guidance on when to use this tool versus alternatives like midnight-get-status, nor any when-not-to-use conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-list-category-toolsARead-onlyIdempotent
📋 DISCOVERY TOOL: List tools within a specific category. Use after midnight-list-tool-categories to see detailed tool information for a category of interest. Supports progressive disclosure pattern.
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | Category to list tools for | |
| includeSchemas | No | Include input/output schemas (default: false) |
Output Schema
| Name | Required | Description |
|---|---|---|
| category | Yes | Category name |
| tools | Yes | Tools in this category |
| suggestion | No | Usage suggestion |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only and idempotent behavior. The description adds the progressive disclosure pattern and that it provides 'detailed tool information', enhancing transparency beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short, front-loaded sentences with an emoji. Every sentence serves a purpose, and the structure is efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 parameters, enum, output schema present), the description fully covers usage context, including the progressive disclosure pattern with sibling tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema provides full parameter descriptions (100% coverage). The description adds no new parameter semantics beyond the schema's details, meriting the baseline score.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it lists tools within a specific category, with the emoji and 'DISCOVERY TOOL' label. It also references the sibling tool 'midnight-list-tool-categories', distinguishing their roles.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states to use after 'midnight-list-tool-categories' and mentions the 'progressive disclosure pattern'. Lacks when-not guidance but provides clear context for correct use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-list-examplesARead-onlyIdempotent
List available Midnight example contracts and DApps with descriptions, complexity ratings, and key features.
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Filter by example type (default: all) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true and idempotentHint=true. Description adds minor context about included output details but does not discuss other behavioral traits like auth needs, rate limits, or performance. The bar is lower due to annotations, so 3 is appropriate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded with the core purpose and includes specific output details. No unnecessary words or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Although no output schema exists, the description compensates by stating what is included in the return (descriptions, complexity ratings, key features). For a simple list tool with one optional parameter, this is largely sufficient, though format details could be added.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with the parameter 'category' already having a clear description ('Filter by example type (default: all)'). The tool description does not add additional meaning beyond what the schema provides, so baseline 3 is correct.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool lists available Midnight example contracts and DApps, and specifies what is included (descriptions, complexity ratings, key features). It is distinct from sibling tools like midnight-list-category-tools and midnight-list-tool-categories.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on what the tool does and what outputs it provides, but does not explicitly state when to use it versus alternatives. However, the name and description make the usage obvious.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-list-tool-categoriesARead-onlyIdempotent
📋 DISCOVERY TOOL: List available tool categories for progressive exploration. Use this FIRST to understand what capabilities are available, then drill into specific categories with midnight-list-category-tools. Reduces cognitive load by organizing 28 tools into 7 logical groups.
| Name | Required | Description | Default |
|---|---|---|---|
| includeToolCounts | No | Include number of tools per category (default: true) |
Output Schema
| Name | Required | Description |
|---|---|---|
| categories | Yes | Available tool categories |
| totalTools | Yes | Total tool count |
| recommendation | No | Suggested starting point |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint and idempotentHint, covering safety. The description adds context about organizing 28 tools into 7 groups, which aids understanding of what the tool returns, though it does not mention any additional behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, consisting of two clear sentences that front-load the purpose with an emoji and immediately convey the tool's role. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one optional parameter) and the presence of an output schema, the description fully covers the necessary context: it explains when to use it, how it fits into a progressive workflow, and what it organizes (28 tools into 7 groups).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage, including a description for the only parameter ('Include number of tools per category (default: true)'). The description does not add further detail about the parameter beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists available tool categories, uses a specific verb ('List') and resource ('tool categories'), and explicitly distinguishes itself from the sibling tool 'midnight-list-category-tools' by indicating it is for broader discovery first.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidance: 'Use this FIRST to understand what capabilities are available, then drill into specific categories with midnight-list-category-tools.' It also mentions a specific alternative tool and explains the benefit of reducing cognitive load.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-review-contractARead-onlyIdempotent
🔍 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)
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Compact contract code to review |
Output Schema
| Name | Required | Description |
|---|---|---|
| summary | Yes | Summary of the contract review |
| issues | Yes | List of issues found |
| improvedCode | No | Improved version of the contract if applicable |
| samplingAvailable | Yes | Whether sampling capability was available |
TDQS
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.
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.
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.
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.
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.
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.
midnight-search-compactARead-onlyIdempotent
Semantic search across Compact smart contract code and patterns. Use this to find circuit definitions, witness functions, ledger declarations, and best practices for Midnight smart contracts.
USAGE GUIDANCE: • Call at most 2 times per question - if first search doesn't help, try different keywords • For comprehensive results, combine with midnight-search-docs • Use specific terms like "ledger", "circuit", "witness" for better matches
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural language search query for Compact code | |
| limit | No | Maximum results to return (default: 10) | |
| filter | No | Optional filters |
Output Schema
| Name | Required | Description |
|---|---|---|
| results | Yes | Array of search results |
| totalResults | Yes | Total number of results returned |
| query | Yes | The search query used |
| warnings | No | Any warnings about the search |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint, idempotentHint, and openWorldHint, indicating safe, repeatable, and non-exhaustive behavior. The description adds that it performs semantic search, which is useful but not critical beyond annotations. No contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise: one sentence for purpose followed by a three-point bullet list. Information is front-loaded and every sentence adds value. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema, the description does not need to detail return values. It covers purpose, usage guidelines, and search scope. Minor omission: could mention that results are code snippets, but output schema likely covers that. Still highly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents all three parameters. Description includes usage tips that indirectly inform the 'query' parameter, but does not add specific semantics beyond what is in the schema. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it is for semantic search across Compact smart contract code and patterns, listing specific items like circuit definitions, witness functions, ledger declarations, and best practices. This distinguishes it from siblings like midnight-search-docs which search documentation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly provides when to use (search for Compact code) and when not (excessive calls limited to 2 per question), and suggests combining with midnight-search-docs for comprehensive results. Also gives keyword recommendations for better matches.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-search-docsARead-onlyIdempotent
Full-text search across official Midnight documentation. Use this to find guides, API documentation, and conceptual explanations about Midnight blockchain and the Compact language.
USAGE GUIDANCE: • Call at most 2 times per question - use different keywords if first search fails • For code examples, combine with midnight-search-compact or midnight-search-typescript • Use category filter to narrow results (guides, api, concepts)
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Documentation search query | |
| category | No | Filter by documentation category (default: all) | |
| limit | No | Maximum results to return (default: 10) |
Output Schema
| Name | Required | Description |
|---|---|---|
| results | Yes | Array of search results |
| totalResults | Yes | Total number of results returned |
| query | Yes | The search query used |
| warnings | No | Any warnings about the search |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint, idempotentHint, openWorldHint. Description adds usage limits (max 2 calls) and hints about combining with other tools, providing behavioral context beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with a single clear main sentence and bullet points for usage guidance. No wasted words, well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (full-text search), presence of output schema, and annotations, the description is complete. It covers purpose, usage, behavioral traits, and collaboration with sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Description adds minimal parameter detail beyond schema (mentions category filter but not new info). Usage guidance about different keywords is useful but not parameter-specific.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool performs full-text search across official Midnight documentation, specifying the resource and action. It distinguishes from siblings by mentioning alternative search tools for code examples (midnight-search-compact, midnight-search-typescript).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit guidance on when to use: call at most 2 times per question, use different keywords if first search fails, and narrow results with category filter. Includes specific alternatives for combining with other tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-search-typescriptARead-onlyIdempotent
Search TypeScript SDK code, types, and API implementations. Use this to find how to use the Midnight JavaScript SDK, type definitions, and integration patterns.
USAGE GUIDANCE: • Call at most 2 times per question - refine keywords rather than repeating • For contract code, use midnight-search-compact instead • Include "type" or "interface" in query for type definitions
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query for TypeScript SDK code | |
| includeTypes | No | Include type definitions (default: true) | |
| includeExamples | No | Include usage examples (default: true) | |
| limit | No | Maximum results to return (default: 10) |
Output Schema
| Name | Required | Description |
|---|---|---|
| results | Yes | Array of search results |
| totalResults | Yes | Total number of results returned |
| query | Yes | The search query used |
| warnings | No | Any warnings about the search |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=true, so the animal agent knows this is a safe, idempotent operation. The description adds minor behavioral context (call limits, query refinement) but does not disclose further behavioral traits beyond what annotations imply. With annotations present, a score of 3 is appropriate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief and well-structured, with a clear opening statement followed by a 'USAGE GUIDANCE' section with bullet points. Every sentence adds value, and there is no fluff or repetition. Very concise for the information provided.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a search tool with 4 parameters, good annotations, and an output schema, the description is complete. It covers purpose, usage limits, alternatives, and query tips. Nothing essential is missing, and the output schema handles return value documentation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%: all parameters (query, includeTypes, includeExamples, limit) have descriptions in the schema. The description adds a small amount of extra guidance for the query parameter (suggesting adding 'type' or 'interface'), but overall does not significantly enhance understanding beyond the schema. Baseline 3 is correct.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Search TypeScript SDK code, types, and API implementations.' It also explicitly distinguishes from the sibling tool midnight-search-compact by noting 'For contract code, use midnight-search-compact instead.' This makes the purpose specific and well-differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidance: 'Call at most 2 times per question - refine keywords rather than repeating' and 'For contract code, use midnight-search-compact instead.' It also advises including 'type' or 'interface' in queries for type definitions. This clearly tells the agent when to use this tool and when to use alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-suggest-toolARead-onlyIdempotent
🎯 SMART DISCOVERY: Describe what you want to do in natural language, and get tool recommendations.
EXAMPLES: • "I want to find example voting contracts" → midnight-search-compact • "Check if my version is outdated" → midnight-upgrade-check • "Analyze my contract for security issues" → midnight-analyze-contract • "I'm new to Midnight and want to get started" → midnight-get-repo-context
This tool matches your intent against known patterns and suggests the most appropriate tools with confidence levels.
USAGE GUIDANCE: • Call once with your intent - no need to call repeatedly • More specific intents get better matches • Use the primaryRecommendation for the best match
| Name | Required | Description | Default |
|---|---|---|---|
| intent | Yes | What you want to accomplish (natural language description) |
Output Schema
| Name | Required | Description |
|---|---|---|
| intent | Yes | The original intent |
| suggestions | Yes | Suggested tools ranked by relevance |
| primaryRecommendation | No | Top recommendation |
| tip | No | Helpful tip |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint=true and idempotentHint=true, indicating safe and idempotent behavior. The description adds context by stating it 'matches your intent against known patterns' and returns recommendations with confidence levels. No contradiction 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the key purpose. It uses emojis for clarity, presents examples in a structured list, and includes a separate usage guidance section. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, read-only, idempotent), the description is complete. It explains the tool's function, usage patterns, and expected output (recommendations with confidence levels). An output schema exists, so return values are covered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with one parameter 'intent' described as 'What you want to accomplish (natural language description)'. The description goes beyond by providing examples of phrasing intents, which adds practical semantic guidance for the user.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: natural language intent matching to recommend tools. It uses a specific verb phrase 'SMART DISCOVERY' and distinguishes from sibling tools by providing examples that map intents to specific sibling tools, thus clarifying its role as a suggestion tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes explicit usage guidance: 'Call once with your intent - no need to call repeatedly', 'More specific intents get better matches', and 'Use the primaryRecommendation for the best match'. It also gives examples of when to use sibling tools directly, providing clear when-to-use and alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
midnight-upgrade-checkARead-only
🚀 COMPOUND TOOL: Complete upgrade analysis in ONE call. Combines version check + breaking changes + migration guide. Use this instead of calling midnight-get-version-info, midnight-check-breaking-changes, and midnight-get-migration-guide separately. Saves ~60% tokens.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Repository name (default: 'compact') | |
| currentVersion | Yes | Your current version (e.g., 'v0.14.0', '0.13.5') |
Output Schema
| Name | Required | Description |
|---|---|---|
| repository | No | Full repository path |
| currentVersion | No | Version being checked |
| version | No | Version summary |
| breakingChanges | No | Breaking changes summary |
| migration | No | Migration guide if needed |
| urgency | No | none|low|medium|high|critical |
| recommendation | No | Actionable recommendation |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so safety profile is covered. The description adds that it is a compound tool that makes a single call, which is beneficial behavioral context. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short (two sentences) and front-loaded with key benefit. The emoji and 'COMPOUND TOOL' label are efficient, though slightly informal. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the high schema coverage, clear annotations, and presence of output schema, the description is complete. It explains the compound nature, use case, and comparison to siblings. Could mention repo parameter significance, but sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents both parameters. The description does not add additional meaning beyond what the schema provides, maintaining baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it is a compound tool for complete upgrade analysis, combining version check, breaking changes, and migration guide. It explicitly names the three individual tools it replaces, distinguishing itself from siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly advises using this tool instead of calling three separate tools, with a concrete reason (saves ~60% tokens). It provides a clear use case and contrasts with alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Tools are mostly distinct with clear purposes. Some overlap exists among version-checking tools and search tools, but descriptions effectively differentiate them. A few compound tools also help reduce ambiguity.
All tools follow a consistent 'midnight-verb-noun' pattern in snake_case. Verbs are descriptive and uniform, with only minor deviations like 'auto-update' using a dash within a compound word.
With 30 tools, the server covers a wide range of functionality for Midnight development. While comprehensive, the count is on the higher side and could potentially be streamlined by merging some overlapping tools without losing clarity.
The tool surface covers the full development cycle: analysis, generation, compilation, security review, documentation, version management, and search. Minor gaps exist (e.g., no deployment or testing tools), but these are within the intended scope of an MCP assistant.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
An MCP server that gives your AI access to the source code and docs of all public github repos
MCP server for AI agent profiles and smart notes. 60+ coding prompt packs with expert personas.
MCP server giving AI agents one-connection access to crypto & DeFi data: DeFi protocol TVL, stableco
Related MCP Servers
- AlicenseBqualityFmaintenanceAn MCP server that provides cryptocurrency project data to AI agents11MIT
- -licenseNot gradedqualityNot gradedmaintenanceAn MCP server that gives AI agents real-time Solana DeFi intelligence — smart money tracking, rug detection, wallet analysis, and token research.
- AlicenseNot gradedqualityDmaintenanceMCP server providing AI assistants with tools for advanced EVM smart contract analysis, including proxy detection, implementation resolution, and security analysis.1MIT
- FlicenseAqualityBmaintenanceAn MCP server that equips AI assistants with curated knowledge and live chain data for the Alkanes metaprotocol and Subfrost network, enabling them to read docs, query the chain, and scaffold contracts.213
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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