Skip to main content
Glama
jankowtf

MCP Server Template for Cursor IDE

by jankowtf

apply_prompt_fix_linter

Analyzes and fixes linter errors by generating actionable prompts with optional specific instructions, enabling efficient error resolution in Cursor IDE.

Instructions

Provides a prompt for analyzing and fixing linter errors

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueYesA description of the linter errors 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 main handler function that implements the tool logic by rendering the 'fix_linter' prompt template using the provided issue, specific_instructions, and version.
    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)]
  • The input schema definition for the tool, specifying required 'issue' parameter and optional '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')", }, }, }, ),
  • The dispatch logic in the call_tool handler that routes calls to 'apply_prompt_fix_linter' and validates inputs before invoking the handler function.
    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, )

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