MCP Shipyard
← Rules catalog

One MCP tool with an action parameter: split it into separate tools

A tool whose action or operation enum has 4 or more values hides several operations behind one description. Split it into one tool per operation.

majorcatchall.mode-parameterChatGPT, Claude

Give each operation its own tool. The rule catchall.mode-parameter is a major finding for ChatGPT and Claude, reported as a warning. It flags a string parameter named action, operation, mode, command or op that has an enum of four or more values.

What you see

  • A scan reports Parameter "action" switches between 5 operations for a tool such as manage_orders.
  • Reviewers cannot tell from the tool's name, annotations or description which operations read and which write.

Why it happens

One tool with action: "list" | "get" | "create" | "update" | "cancel" is quick to build and keeps the tool count low. But a single set of annotations has to cover every action. A tool that can cancel an order cannot honestly claim readOnlyHint: true, so the read actions get confirmation prompts they do not need, or the write actions get no warning.

OpenAI's plugin guidelines (6.2(b)) say not to use "discovery, operation selection, or schema fetching with a generic executor" to reach operations that are not individually exposed, and OpenAI's server guide prefers one focused tool per distinct action over one tool with many unrelated modes. Claude's review criteria make the same point for HTTP methods: safe and unsafe operations must be in separate tools, and describing them in one description does not satisfy the requirement.

Check it yourself

curl -s -X POST https://mcp.acme.example/mcp \
  -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
 | jq '.result.tools[] | {name, modes: (.inputSchema.properties | to_entries[] | select(.key|test("^(action|operation|mode|command|op)$")) | .value.enum)}'

Fix

Replace manage_orders(action=...) with list_orders, get_order, create_order, update_order and cancel_order. Give each its own description, schema and annotations (readOnlyHint: true on the first two, destructiveHint: true on cancel_order). Keep the total tool count reasonable (count.too-many).

Verify

No tool in tools/list has an operation-selector enum with four or more values. Re-scan. Related: catchall.generic-executor and annotations.write-marked-readonly.

Which clients care

ChatGPT and Claude, per the rule.

Source

OpenAI plugin guidelines: https://developers.openai.com/plugins/plugin-guidelines

OpenAI MCP server guide: https://developers.openai.com/plugins/build/mcp-server

Claude review criteria: https://claude.com/docs/connectors/building/review-criteria

Run a free scan at https://mcpshipyard.com/scan to check every rule at once.

Check every rule at once

A free scan runs this check and the other 152 against your live URL.

Scan a server