codefmt

Format/lint JS, Python, HubL for automation platforms. Tools: format_code, format_json, ask_codefmt

我該用這個嗎

品質與安全性

A
說明品質
100%
結構描述完整度
100%
命名品質
93%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

根據工具定義與協定合規性的自動化分析。

上下文成本

~516Token(工具定義)
~1.0 KB典型回應大小
極小的注意力影響(128k 上下文的 0.40%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "codefmt": {
      "url": "https://codefmt.dev/api/mcp"
    }
  }
}

遠端端點

https://codefmt.dev/api/mcpstreamable-http

它能做什麼

工具清單

工具(3)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🟢format_code(code, platform, language)

Format and lint JavaScript, Python, or HubL code for Zapier, n8n, Pipedream, Make, or HubSpot. Wraps the source in each platform's runtime shell before formatting so top-level await, bare return, and injected globals don't break the formatter. Returns formatted code plus lint diagnostics.

輸入結構描述

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Source code to format (≤50KB)."
    },
    "platform": {
      "type": "string",
      "enum": [
        "zapier",
        "n8n",
        "pipedream",
        "make",
        "hubspot",
        "hubl"
      ],
      "description": "Target automation platform."
    },
    "language": {
      "type": "string",
      "enum": [
        "javascript",
        "python"
      ],
      "description": "Defaults to javascript. zapier, n8n, pipedream, make, and hubspot support python; hubl does not."
    }
  },
  "required": [
    "code",
    "platform"
  ],
  "additionalProperties": false
}
🟢ask_codefmt(query)

Ask a natural-language question about codefmt: formatting and linting JavaScript, Python, and HubL for automation platforms (Zapier, n8n, Pipedream, Make, HubSpot). Returns a grounded answer drawn from codefmt's own content with cited source URLs and a confidence score (0-1, how much of the question the answer covers, weighted toward its rarer terms); off-topic or too-weakly-matched questions are refused rather than guessed.

輸入結構描述

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "The natural-language question about codefmt."
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}
🟢format_json(json, indent, sort_keys)

Format (pretty-print or minify) a JSON document, optionally sorting object keys. Number literals are preserved exactly (64-bit IDs safe); parse errors report the exact line and column.

輸入結構描述

{
  "type": "object",
  "properties": {
    "json": {
      "type": "string",
      "description": "The JSON text to format."
    },
    "indent": {
      "type": "string",
      "enum": [
        "2",
        "4",
        "tab",
        "minify"
      ],
      "description": "Indentation: '2' or '4' spaces, 'tab', or 'minify'. Defaults to '2'."
    },
    "sort_keys": {
      "type": "boolean",
      "description": "Sort object keys alphabetically. Defaults to false."
    }
  },
  "required": [
    "json"
  ],
  "additionalProperties": false
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本3 個工具
已驗證未記錄版本3 個工具