oas2mcp.agent.enhancer.prompts¶
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.
Examples
system_prompt = build_operation_enhancer_system_prompt()
user_prompt = build_operation_enhancer_user_prompt(context)
Functions¶
Build dynamic prompt middleware for the enhancer. |
|
Build deterministic runtime-specific instructions for enhancer prompts. |
|
Build the base system prompt for the operation enhancer. |
|
Build the user prompt for one operation enhancement. |
Module Contents¶
- oas2mcp.agent.enhancer.prompts.build_operation_enhancer_dynamic_prompt()[source][source]¶
Build dynamic prompt middleware for the enhancer.
- Parameters:
None.
- Returns:
The LangChain dynamic prompt middleware callable.
- Raises:
None. –
- oas2mcp.agent.enhancer.prompts.build_operation_enhancer_runtime_instruction_lines(runtime: oas2mcp.agent.runtime.Oas2McpRuntimeContext) list[str][source][source]¶
Build deterministic runtime-specific instructions for enhancer prompts.
- oas2mcp.agent.enhancer.prompts.build_operation_enhancer_system_prompt() str[source][source]¶
Build the base system prompt for the operation enhancer.
- Parameters:
None.
- Returns:
The system prompt.
- Return type:
str
- Raises:
None. –
- oas2mcp.agent.enhancer.prompts.build_operation_enhancer_user_prompt(context: oas2mcp.agent.enhancer.models.OperationEnhancementContext) str[source][source]¶
Build the user prompt for one operation enhancement.
- Parameters:
context – The operation enhancement context.
- Returns:
The user prompt string.
- Return type:
str
- Raises:
None. –