Usage
Arguments
Type of component to create. Must be one of:
tool- MCP tool for performing actionsresource- MCP resource for exposing dataprompt- MCP prompt templatewidget- Interactive UI widget component
Name of the component to create. Will be converted to kebab-case for the filename.Supports nested paths like
api/users to create files in subdirectories.Options
Custom output directory for the generated file.If not specified, uses default directories:
- Tools:
src/tools/ - Resources:
src/resources/ - Prompts:
src/prompts/ - Widgets:
src/tools/
Examples
Create a new tool:Generated files
Tool template
Generates a TypeScript file insrc/tools/ with:
- Tool definition function
- Type-safe parameter schema
- Handler implementation stub
- JSDoc comments
src/tools/send-email.ts
Resource template
Generates a TypeScript file insrc/resources/ with:
- Resource definition function
- URI template
- Handler implementation stub
src/resources/user-profile.ts
Prompt template
Generates a TypeScript file insrc/prompts/ with:
- Prompt definition function
- Message template
- Parameter placeholders
src/prompts/code-review.ts
Widget template
Generates a TSX file insrc/tools/ with:
- React component structure
- Widget props interface
- Basic UI scaffold
src/tools/dashboard.tsx
File naming
All generated files use kebab-case naming:- Input:
SendEmail→ Output:send-email.ts - Input:
userProfile→ Output:user-profile.ts - Input:
DatabaseQuery→ Output:database-query.ts
The create command will not overwrite existing files. If a file already exists at the target path, the command will exit with an error.
Related
Tools
Learn about creating tools
Resources
Learn about creating resources
Prompts
Learn about creating prompts
Widgets
Learn about creating widgets