Skip to main content
Glama
jankowtf

MCP Server Template for Cursor IDE

by jankowtf

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
NameRequiredDescriptionDefault
issueYesA description of the issue to be analyzed and fixed
specific_instructionsNoOptional specific instructions to include in the prompt
versionNoThe version of the prompt template to use (e.g., '1.0.0', '1.1.0', or 'latest')

Implementation Reference

  • 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)]
  • 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,
        )
  • 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')",
                },
            },
        },
    ),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jankowtf/mcp-hitchcode'

If you have feedback or need assistance with the MCP directory API, please join our Discord server