apply_prompt_fix_linter
Analyzes linter errors and generates prompts to fix them in Cursor IDE, helping developers resolve coding issues efficiently.
Instructions
Provides a prompt for analyzing and fixing linter errors
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue | Yes | A description of the linter errors 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:291-314 (handler)The handler function that executes the tool logic by rendering a specific prompt template ('fix_linter') for fixing linter issues.async def apply_prompt_fix_linter( issue: str, specific_instructions: str = "", version: str = "latest", ) -> list[types.TextContent]: """ Provides a prompt for analyzing and fixing linter errors. Args: issue: A description of the linter errors 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_linter", version_str=version, issue=issue, specific_instructions=specific_instructions, ) return [types.TextContent(type="text", text=response_text)]
- mcp_hitchcode/server.py:703-724 (schema)The input schema definition for the 'apply_prompt_fix_linter' tool, defining parameters like issue, specific_instructions, and version.types.Tool( name="apply_prompt_fix_linter", description="Provides a prompt for analyzing and fixing linter errors", inputSchema={ "type": "object", "required": ["issue"], "properties": { "issue": { "type": "string", "description": "A description of the linter errors 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')", }, }, }, ),
- mcp_hitchcode/server.py:496-509 (registration)The dispatch/registration logic within the @app.call_tool() handler that routes calls to the apply_prompt_fix_linter function when the tool name matches.elif name == "apply_prompt_fix_linter": 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_linter( issue=arguments["issue"], specific_instructions=specific_instructions, version=version, )