Lint a saved MCP tools/list JSON file for invalid tool names, weak descriptions, untyped input schema parameters and token bloat. Use when reviewing, auditing or fixing MCP tool definitions before release or in CI.
97%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Check MCP tool definitions against ten rules and fix what is reported. The check reads a local JSON file only. It never connects to a server and needs no Node.js or npm install: Python 3.8 or newer is enough.
tools/list result.{ "tools": [...] } (a tools/list result) or a bare array of tool objects. If the user only has source code, write the tool list to a file first. Do not contact the server yourself.python3 scripts/lint_tools.py FILE
Options: --format json, --strict (warnings also fail), --config FILE, --max-tool-tokens N.severity ruleId tool path message. The path is an RFC 6901 JSON Pointer into the file. Fix errors first, then warnings. The rule details are in the references below.inputSchema), then run the linter again until it reports 0 errors.Exit codes: 0 no errors, 1 errors (or warnings with --strict), 2 unreadable file, invalid JSON, invalid configuration or usage error.
| Id | Default | Checks |
|---|---|---|
name-format | error | Name is 1-128 characters of A-Z a-z 0-9 _ - . |
name-portability | warning | Name also fits ^[a-zA-Z0-9_-]{1,64}$ (stricter model APIs) |
name-duplicate | error | Names are unique within the list |
description-missing | error | Every tool has a non-blank description |
description-quality | warning | Not shorter than 20 characters, not the tool name, not a generic phrase |
schema-root | error | inputSchema is an object with type: "object" |
required-undefined | error | Every required entry is a string declared in properties |
param-type-missing | warning | Every parameter declares a type, enum, const, $ref or combinator |
param-description-missing | warning | Every parameter has a description |
size-budget | warning | Tool at most 800 tokens, whole list at most 8000 |
Token estimate: ceil(length of compact JSON / 4). It is an approximation, not a tokenizer count.
required.$ref targets are not resolved and no full JSON Schema validation is done.The full TypeScript library and tests live at https://github.com/Trysac/u023-mcp-schema-lint.