For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
kmcp add-tool
kmcp add-tool command
Create a boilerplate for a sample echo tool in the tools directory of your MCP project and update all the MCP server dependencies to import that tool. You can use this boilerplate as the base to build your own tool.
kmcp add-tool [tool-name] [flags]Flags:
--description, -d- Tool description--force, -f- Overwrite existing tool file-h, --help- Help for the command--interactive, -i- Interactive tool creation--project-dir- Project directory (default: current directory)
Global Flags:
--verbose, -v- Show detailed output
Example
The following command creates a mytool MCP tool in the my-mcp-server MCP project. You can edit the file and adjust the code as needed.
kmcp add-tool mytool --project-dir my-mcp-server