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')",
                },
            },
        },
    ),
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'provides a prompt', implying a read-only or informational operation, but doesn't clarify if this triggers any actions, requires specific permissions, has side effects, or involves rate limits. For a tool with potential implications (given 'fixing issues'), this lack of detail on behavior is a significant gap, though it doesn't contradict any annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It's front-loaded with the core purpose, though it could be slightly more specific. There's no redundancy or fluff, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity implied by 'fixing issues' and the lack of annotations and output schema, the description is incomplete. It doesn't explain what the prompt output looks like, how it's used, or any behavioral traits. For a tool with 3 parameters and no structured output information, more context is needed to guide effective use, making it inadequate for the agent's needs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear documentation for 'issue', 'specific_instructions', and 'version'. The description adds no additional meaning beyond the schema—it doesn't explain how parameters interact (e.g., how 'specific_instructions' modifies the prompt) or provide examples. Since schema coverage is high, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'provides a prompt for performing root cause analysis and fixing issues', which gives a general purpose but lacks specificity. It mentions 'prompt' and 'root cause analysis/fixing' but doesn't clarify what kind of prompt (e.g., AI prompt, system prompt) or what domain it applies to. Compared to siblings like 'apply_prompt_change' or 'apply_prompt_unit_tests', it doesn't clearly differentiate its specific function beyond the generic 'fix' aspect.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no guidance on when to use this tool versus alternatives. It doesn't specify scenarios where this prompt is preferred over other 'apply_prompt_' siblings (e.g., 'apply_prompt_change' for modifications, 'apply_prompt_unit_tests' for testing) or other tools like 'fetch_railway_docs'. There's no mention of prerequisites, constraints, or typical use cases, leaving the agent with no contextual cues for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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