How do you design a tool that Claude uses correctly?
Write a detailed description: what the tool does, when to use it and when not, what each parameter means, and its limits. Add input_examples for complex inputs. Consolidate related actions and namespace names by service. Return a minimal, actionable result with clear, flagged errors. Put approvals and limits in the tool's own code.
Expose tools (model actions), resources (context data) and prompts (user templates). Use stdio for local servers, with credentials from the environment, and Streamable HTTP for remote servers, with OAuth-based authorization. Validate that tokens were issued to your server and never pass them through. Connect from Claude Code, the Agent SDK (tools named mcp__server__tool) or the Messages API's MCP connector, which needs a remote HTTP server.
How do you choose between built-in tools, custom tools, skills and MCP?
Ask where the capability must live, who maintains it and how Claude finds it. Use a built-in or server tool when one exists, such as web search. Use a custom tool for logic that belongs to one app. Use an MCP server when many clients share one capability. Use a skill for procedures and know-how that tell Claude how to use the tools well.