midnight-mcp:mcp-format

Format Compact source code via the midnight-format-contract MCP formatter.

37|9|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/devrelaicom/midnight-expert --skill midnight-mcp-mcp-format
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: midnight-mcp:mcp-format
Source: https://github.com/devrelaicom/midnight-expert/tree/main/plugins/midnight-mcp/skills/mcp-format
Command: npx skills add https://github.com/devrelaicom/midnight-expert --skill midnight-mcp-mcp-format

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill ensures Compact source code is consistently formatted before being presented to users, preventing style inconsistencies and avoiding accidental in-place modifications caused by local formatters.

Core Features & Use Cases

  • Hosted formatting via MCP: Use the midnight-format-contract service to format Compact code provided as a string without writing to disk.
  • Version-aware formatting: Target a specific compiler version or run multi-version checks to compare formatted outputs across versions.
  • Safe, resilient behavior: Handles parse failures, rate limits, timeouts, and service errors by presenting unformatted code with clear diagnostics instead of risking file modification.
  • Use Case: Format generated code examples, file previews, documentation snippets, and code shown during explanations before presentation.

Quick Start

Format the provided Compact source with the midnight-format-contract MCP formatter and return the formatted output for display.

Frequently Asked Questions about midnight-mcp:mcp-format

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I format Compact source code into a consistent style before display?

You can format Compact source code by passing it as a string to the midnight-format-contract MCP formatter, which returns consistently formatted output without writing to disk.

Can I check Compact code formatting consistency across multiple compiler versions?

Yes, you can pass a versions parameter to run multi-version checks, comparing the formatted Compact code outputs across different compiler versions to detect version-specific style differences.

What happens when formatting Compact code if there is a parse failure or service timeout?

The formatter handles parse failures, rate limits, timeouts, and service errors safely by presenting the original unformatted code with clear diagnostics instead of risking file modification.

Does the Compact code formatter modify files on disk during processing?

No, the formatter operates in-memory by accepting code strings and returning formatted output, preventing style inconsistencies and avoiding accidental in-place modifications caused by local formatters.

When should I use an MCP formatter for Compact code?

Use this formatter whenever Compact code will be presented or stored, including generated examples, file previews, documentation snippets, and multi-version consistency checks before presentation.

What does the Compact formatting service return besides the formatted code?

The service returns the formatted output, a changed flag indicating if modifications were made, diffs when available, and structured parse or service errors for diagnostics.