Skip to main content
Glama

MCP Server Template for Cursor IDE

by jankowtf

apply_prompt_docker

Generate Docker container configurations using a prompt template for specific containerization objectives and versioned instructions.

Instructions

Provides a prompt template for Docker container configurations and orchestration

Input Schema

NameRequiredDescriptionDefault
containerization_objectiveYesDescription of the containerization objective
specific_instructionsNoOptional specific instructions about containerization requirements
versionNoThe version of the prompt template to use (e.g., '1.0.0', '1.1.0', or 'latest')

Input Schema (JSON Schema)

{ "properties": { "containerization_objective": { "description": "Description of the containerization objective", "type": "string" }, "specific_instructions": { "description": "Optional specific instructions about containerization requirements", "type": "string" }, "version": { "description": "The version of the prompt template to use (e.g., '1.0.0', '1.1.0', or 'latest')", "type": "string" } }, "required": [ "containerization_objective" ], "type": "object" }

Implementation Reference

  • The core handler function that implements the 'apply_prompt_docker' tool. It renders and returns a Docker-specific prompt template based on the provided containerization_objective, specific_instructions, and version.
    async def apply_prompt_docker( containerization_objective: str, specific_instructions: str = "", version: str = "latest", ) -> list[types.TextContent]: """ Provides a prompt template for Docker container configurations and orchestration. Args: containerization_objective: Description of the containerization objective. specific_instructions: Optional specific instructions about containerization requirements. 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 containerization objective and specific instructions response_text = render_prompt_template( "docker", version_str=version, objective=containerization_objective, specific_instructions=specific_instructions, ) return [types.TextContent(type="text", text=response_text)]
  • Tool registration in the list_tools() function, defining the name, description, and input schema for 'apply_prompt_docker'.
    types.Tool( name="apply_prompt_docker", description="Provides a prompt template for Docker container configurations and orchestration", inputSchema={ "type": "object", "required": ["containerization_objective"], "properties": { "containerization_objective": { "type": "string", "description": "Description of the containerization objective", }, "specific_instructions": { "type": "string", "description": "Optional specific instructions about containerization requirements", }, "version": { "type": "string", "description": "The version of the prompt template to use (e.g., '1.0.0', '1.1.0', or 'latest')", }, }, }, ),
  • Dispatch handler logic within the main call_tool function that validates arguments and invokes the apply_prompt_docker handler.
    elif name == "apply_prompt_docker": if "containerization_objective" not in arguments: return [ types.TextContent( type="text", text="Error: Missing required argument 'containerization_objective'", ) ] version = arguments.get("version", "latest") specific_instructions = arguments.get("specific_instructions", "") return await apply_prompt_docker( containerization_objective=arguments["containerization_objective"], 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