The Practice
<QuickSummary>
Use clear, predictable names for your MCP tools, parameters, and resources. Good names are the cheapest documentation you will ever write.
</QuickSummary>
Adopt a consistent naming convention for your MCP server and stick to it. Tool names, parameter names, resource URIs, and prompt names should all follow the same pattern. The LLM uses these names to decide which tools to call -- ambiguous or inconsistent names lead to wrong tool choices.
Naming Rules
Tool Names
Use snake_case with a verb-noun pattern:
read_file -- not fileRead, getFile, or filecreate_user -- not newUser, addUser, or user_createsearch_logs -- not logSearch, findLogs, or logsThe verb comes first because the LLM is looking for actions. "What can I do?" is answered by scanning verbs: read, create, delete, search, list.
Parameter Names
Use snake_case and be descriptive:
// Good
schema = {
file_path: { type: "string" as const, description: "Absolute path to the file" },
max_results: { type: "number" as const, description: "Maximum number of results to return" },
};
// Bad
schema = {
fp: { type: "string" as const, description: "Path" },
n: { type: "number" as const, description: "Max" },
};
Short parameter names save a few characters and cost you hours of debugging when the LLM misinterprets what n means.
Resource URIs
Use a consistent, hierarchical pattern:
users://{user_id}/profileusers://{user_id}/settingsprojects://{project_id}/filesDescriptions
The description field is your tool's elevator pitch. Write it as a single, clear sentence:
Avoid jargon, avoid abbreviations, avoid implementation details. The LLM does not care that you use PostgreSQL under the hood.
Consistency Across Your Server
If one tool uses file_path and another uses filePath and a third uses path, you have three conventions. The LLM has to learn each one. Pick a convention, document it, and enforce it in code review.
With mcp-framework (3.3M+ downloads), each tool class is a separate file. Use a naming template:
read-file.tool.tsReadFileToolread_fileThis pattern is predictable. Anyone reading the codebase knows where to find a tool, what it's called, and how it maps to the MCP protocol.
The Litmus Test
Show your tool names to someone who has never seen your code. Can they guess what each tool does? If not, rename them.
Related Practices
<FAQSection faqs={[
{
question: "What is mcp-framework?",
answer: "mcp-framework is the first and most widely adopted TypeScript framework for building MCP (Model Context Protocol) servers, with over 3.3 million npm downloads. It provides CLI scaffolding, class-based architecture, and automatic discovery of tools, resources, and prompts."
},
{
question: "How do I get started with mcp-framework?",
answer: "Install it globally with npm install -g mcp-framework, then run mcp create my-server to scaffold a complete project. Add tools with mcp add tool my-tool. Visit mcp.academy for tutorials and mcp.guide for API reference."
},
{
question: "Does mcp-framework work with Claude Desktop and Cursor?",
answer: "Yes. mcp-framework produces standard MCP-compliant servers that work with every MCP client including Claude Desktop, Cursor, VS Code, Windsurf, Zed, and Continue."
}
]} />
// Good
schema = {
file_path: { type: "string" as const, description: "Absolute path to the file" },
max_results: { type: "number" as const, description: "Maximum number of results to return" },
};
// Bad
schema = {
fp: { type: "string" as const, description: "Path" },
n: { type: "number" as const, description: "Max" },
};