Skip to content

MP014: snake-vs-camel

All tools in one server should follow the same naming convention.

At a glance

Category naming
Default severity note
Auto-fixable no
LLM-gated no
Stable since v0.1.0

What this rule checks

If most tools in your server use snake_case but one tool uses camelCase, MP014 fires on the outlier. The MCP specification allows either convention; mixing them within a single server breaks predictability.

By default mcpolish prefers snake_case (it matches the Python SDK examples and the official registry).

Why it matters

A consistent convention is easier for the agent to learn. Two tools called getThing and get_thing look unrelated even when they implement the same kind of action. Consistency removes that source of confusion.

This rule defaults to note severity because it is the lowest-stakes naming issue.

Example: code that triggers this rule

@mcp.tool()
def get_thing(name: str) -> dict:
    ...

@mcp.tool()
def get_other_thing(name: str) -> dict:
    ...

@mcp.tool()
def getThirdThing(name: str) -> dict:
    ...

Two tools use snake_case. One uses camelCase. MP014 fires on getThirdThing.

Example: how to fix it

Pick one convention. Apply it to all three:

@mcp.tool()
def get_third_thing(name: str) -> dict:
    ...

Configuration

[tool.mcpolish.MP014]
style = "snake"     # or "camel" or "auto"

auto finds the dominant style in your server and flags outliers.

When to disable this rule

If you intentionally mix conventions to follow an upstream API's naming (e.g. wrapping a JavaScript library whose function names are camelCase), set style = "camel", or ignore the rule.

How the check works under the hood

For each tool, mcpolish classifies the name as snake, camel, or unknown using two regexes. If the preferred style is auto, the rule picks the most common style as the dominant one. Any tool that classifies differently from the dominant style fires.

  • MP012 inconsistent-verb-pattern: another consistency rule.
  • MP010 generic-tool-name: catches the name being too short before casing matters.

References

  • MCP specification, tool name format.
  • Wang et al., 2026. arXiv:2602.18914, section 4.3 discussion.