apply_prompt_fix
Generate prompts for root cause analysis and issue resolution in Cursor IDE. Provide issue details to receive structured troubleshooting guidance.
Instructions
Provides a prompt for performing root cause analysis and fixing issues
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue | Yes | A description of the issue to be analyzed and fixed | |
| specific_instructions | No | Optional specific instructions to include in the prompt | |
| version | No | The version of the prompt template to use (e.g., '1.0.0', '1.1.0', or 'latest') |
Implementation Reference
- mcp_hitchcode/server.py:265-288 (handler)The handler function for the 'apply_prompt_fix' tool. It renders the 'fix_general' prompt template with the provided issue, specific_instructions, and version, then returns it as TextContent.async def apply_prompt_fix( issue: str, specific_instructions: str = "", version: str = "latest", ) -> list[types.TextContent]: """ Provides a prompt for performing root cause analysis and fixing issues. Args: issue: A description of the issue to be analyzed and fixed. specific_instructions: Optional specific instructions to include in the prompt. version: The version of the prompt template to use. Defaults to "latest". Returns: A list containing a TextContent object with the prompt. """ # Render the prompt template with the issue and specific instructions response_text = render_prompt_template( "fix_general", version_str=version, issue=issue, specific_instructions=specific_instructions, ) return [types.TextContent(type="text", text=response_text)]
- mcp_hitchcode/server.py:439-452 (registration)Tool dispatching logic within the unified call_tool handler that invokes apply_prompt_fix with input validation for required 'issue' parameter.elif name == "apply_prompt_fix": if "issue" not in arguments: return [ types.TextContent( type="text", text="Error: Missing required argument 'issue'" ) ] version = arguments.get("version", "latest") specific_instructions = arguments.get("specific_instructions", "") return await apply_prompt_fix( issue=arguments["issue"], specific_instructions=specific_instructions, version=version, )
- mcp_hitchcode/server.py:615-636 (schema)JSON schema definition for the input parameters of the 'apply_prompt_fix' tool, as registered in list_tools.types.Tool( name="apply_prompt_fix", description="Provides a prompt for performing root cause analysis and fixing issues", inputSchema={ "type": "object", "required": ["issue"], "properties": { "issue": { "type": "string", "description": "A description of the issue to be analyzed and fixed", }, "specific_instructions": { "type": "string", "description": "Optional specific instructions to include in the prompt", }, "version": { "type": "string", "description": "The version of the prompt template to use (e.g., '1.0.0', '1.1.0', or 'latest')", }, }, }, ),