Menu

Post image 1
Post image 2
1 / 2
0

MCP tool naming: 6 patterns ranked by how well they survive a refactor

DEV Community·James O'Connor·4 months ago
#e6zHCafx
#dev#tool#model#name#verb#domain
Reading 0:00
15s threshold

What happens to your agent when the team renames users to accounts, and why the tool name you picked six months ago decides whether anything breaks TL;DR: I have shipped MCP servers where the tool names were a thin shell over the underlying REST API, and I have shipped servers where the names came from the domain model instead. The domain-named ones survived backend refactors with close to zero churn. The pass-through ones broke every time someone renamed a table or split a service. After ranking six naming patterns by two axes (how well a name survives a refactor of the system underneath it, and how cleanly the model can pick the right tool), my house pick is ubiquitous-language naming inside a bounded-context prefix, with Pydantic discriminated-union return types doing the schema work. The one-line version of my opinion: Domain-Driven Design plus tool-use schemas is the production fix for agents. The MCP layer is where the anti-corruption-layer belongs, not an afterthought you bolt on later.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More