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
| Name | Required | Description | Default |
|---|---|---|---|
| containerization_objective | Yes | Description of the containerization objective | |
| specific_instructions | No | Optional specific instructions about containerization requirements | |
| version | No | The 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
- mcp_hitchcode/server.py:369-392 (handler)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)]
- mcp_hitchcode/server.py:769-790 (registration)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')", }, }, }, ),
- mcp_hitchcode/server.py:540-554 (handler)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, )