oas2mcp.agent.enhancer.prompts ============================== .. py:module:: oas2mcp.agent.enhancer.prompts .. autoapi-nested-parse:: Prompt builders for the operation enhancer agent. Purpose: Build prompt text for refining one normalized API operation into a cleaner MCP-friendly representation. Design: - Keep prompt construction deterministic. - Use dynamic prompt middleware for runtime-aware instructions. - Keep the enhancer focused on one operation at a time. - Treat deterministic candidate values as hints, not final truth. - Make the required structured output explicit to reduce empty-object failures during orchestrated batch runs. .. rubric:: Examples .. code-block:: python system_prompt = build_operation_enhancer_system_prompt() user_prompt = build_operation_enhancer_user_prompt(context) Functions --------- .. autoapisummary:: oas2mcp.agent.enhancer.prompts.build_operation_enhancer_dynamic_prompt oas2mcp.agent.enhancer.prompts.build_operation_enhancer_runtime_instruction_lines oas2mcp.agent.enhancer.prompts.build_operation_enhancer_system_prompt oas2mcp.agent.enhancer.prompts.build_operation_enhancer_user_prompt Module Contents --------------- .. py:function:: build_operation_enhancer_dynamic_prompt() Build dynamic prompt middleware for the enhancer. :param None.: :returns: The LangChain dynamic prompt middleware callable. :raises None.: .. py:function:: build_operation_enhancer_runtime_instruction_lines(runtime: oas2mcp.agent.runtime.Oas2McpRuntimeContext) -> list[str] Build deterministic runtime-specific instructions for enhancer prompts. .. py:function:: build_operation_enhancer_system_prompt() -> str Build the base system prompt for the operation enhancer. :param None.: :returns: The system prompt. :rtype: str :raises None.: .. py:function:: build_operation_enhancer_user_prompt(context: oas2mcp.agent.enhancer.models.OperationEnhancementContext) -> str Build the user prompt for one operation enhancement. :param context: The operation enhancement context. :returns: The user prompt string. :rtype: str :raises None.: