This system allows users to customize the prompt content for each tool function through environment variables. This provides high flexibility, enabling you to adjust the AI assistant's behavior according to specific needs without modifying the code. There are two customization methods:
1.**Override Mode**: Completely replace the original prompt
2.**Append Mode**: Add new content based on the existing prompt
Where `[FUNCTION_NAME]` is the name of the tool function in uppercase. For example, for the task planning function `planTask`, the corresponding environment variable name is `MCP_PROMPT_PLAN_TASK`.
This method has the advantage of keeping prompt configurations together with other MCP configurations, which is particularly useful when different projects require different prompts.
## Usage Examples
### Override Mode Example
```
# In .env file - completely replace the PLAN_TASK prompt
MCP_PROMPT_PLAN_TASK=## Custom Task Planning\n\nPlease plan the task based on the following information:\n\n{description}\n\nRequirements: {requirements}\n
```
Or configure in mcp.json:
```json
"env": {
"MCP_PROMPT_PLAN_TASK": "## Custom Task Planning\n\nPlease plan the task based on the following information:\n\n{description}\n\nRequirements: {requirements}\n"
}
```
### Append Mode Example
```
# In .env file - append content after the original PLAN_TASK prompt
MCP_PROMPT_PLAN_TASK_APPEND=\n\n## Additional Guidance\n\nPlease pay special attention to the following:\n1. Prioritize task dependencies\n2. Minimize task coupling
```
Or configure in mcp.json:
```json
"env": {
"MCP_PROMPT_PLAN_TASK_APPEND": "\n\n## Additional Guidance\n\nPlease pay special attention to the following:\n1. Prioritize task dependencies\n2. Minimize task coupling"
}
```
## Dynamic Parameter Support
Custom prompts can also use defined dynamic parameters by using the `{paramName}` syntax. The system will replace these placeholders with actual parameter values during processing.
The parameters supported by each function are as follows:
### planTask Supported Parameters
-`{description}` - Task description
-`{requirements}` - Task requirements
-`{existingTasksReference}` - Whether to reference existing tasks
Suppose you want to add company-specific brand information and guidelines to all task execution guides:
```
# In .env file
MCP_PROMPT_EXECUTE_TASK_APPEND=\n\n## Company-Specific Guidelines\n\nWhen executing tasks, please follow these principles:\n1. Keep code consistent with company style guide\n2. All new features must have corresponding unit tests\n3. Documentation must use company standard templates\n4. Ensure all user interface elements comply with brand design specifications
```
Or configure in mcp.json:
```json
"env": {
"MCP_PROMPT_EXECUTE_TASK_APPEND": "\n\n## Company-Specific Guidelines\n\nWhen executing tasks, please follow these principles:\n1. Keep code consistent with company style guide\n2. All new features must have corresponding unit tests\n3. Documentation must use company standard templates\n4. Ensure all user interface elements comply with brand design specifications"
}
```
### Example 2: Adjust Task Analysis Style
Suppose you want to make task analysis more security-oriented:
```
# In .env file
MCP_PROMPT_ANALYZE_TASK=## Security-Oriented Task Analysis\n\nPlease conduct a comprehensive security analysis for the following task:\n\n**Task Summary:**\n{summary}\n\n**Initial Concept:**\n{initialConcept}\n\nDuring the analysis, please pay special attention to:\n1. Code injection risks\n2. Permission management issues\n3. Data validation and sanitization\n4. Security risks of third-party dependencies\n5. Potential configuration errors\n\nFor each potential issue, please provide:\n- Issue description\n- Impact level (Low/Medium/High)\n- Recommended solution\n\n{previousAnalysis}
```
Or configure in mcp.json:
```json
"env": {
"MCP_PROMPT_ANALYZE_TASK": "## Security-Oriented Task Analysis\n\nPlease conduct a comprehensive security analysis for the following task:\n\n**Task Summary:**\n{summary}\n\n**Initial Concept:**\n{initialConcept}\n\nDuring the analysis, please pay special attention to:\n1. Code injection risks\n2. Permission management issues\n3. Data validation and sanitization\n4. Security risks of third-party dependencies\n5. Potential configuration errors\n\nFor each potential issue, please provide:\n- Issue description\n- Impact level (Low/Medium/High)\n- Recommended solution\n\n{previousAnalysis}"
}
```
### Example 3: Simplify Task List Display
If you find the default task list too detailed, you can simplify the display: