oas2mcp.agent.summarizer.prompts ================================ .. py:module:: oas2mcp.agent.summarizer.prompts .. autoapi-nested-parse:: Prompt builders for the catalog summarizer agent. Purpose: Build the prompt text used by the catalog-level summarizer agent. Design: - Keep prompt construction deterministic. - Separate the base system prompt from context serialization. - Align the prompt with the ``CatalogSummary`` structured output model. - Use LangChain v1 dynamic prompt middleware for runtime-aware system instructions. - Prioritize conceptual understanding of the API before operational or implementation detail. .. rubric:: Examples .. code-block:: python system_prompt = build_catalog_summary_system_prompt() user_prompt = build_catalog_summary_user_prompt(context) Functions --------- .. autoapisummary:: oas2mcp.agent.summarizer.prompts.build_catalog_summary_dynamic_prompt oas2mcp.agent.summarizer.prompts.build_catalog_summary_runtime_instruction_lines oas2mcp.agent.summarizer.prompts.build_catalog_summary_system_prompt oas2mcp.agent.summarizer.prompts.build_catalog_summary_user_prompt Module Contents --------------- .. py:function:: build_catalog_summary_dynamic_prompt() Build dynamic prompt middleware for the catalog summarizer. :returns: The LangChain dynamic prompt middleware callable. :raises None.: .. rubric:: Examples .. code-block:: python middleware = build_catalog_summary_dynamic_prompt() .. py:function:: build_catalog_summary_runtime_instruction_lines(runtime: oas2mcp.agent.runtime.Oas2McpRuntimeContext) -> list[str] Build deterministic runtime-specific instructions for summary prompts. .. py:function:: build_catalog_summary_system_prompt() -> str Build the base system prompt for the catalog summarizer agent. :param None.: :returns: The system prompt string. :raises None.: .. rubric:: Examples .. code-block:: python prompt = build_catalog_summary_system_prompt() .. py:function:: build_catalog_summary_user_prompt(context: oas2mcp.agent.summarizer.context.CatalogSummaryContext) -> str Build the user prompt for the catalog summarizer agent. :param context: The structured summarizer context. :returns: The user prompt string. :raises None.: .. rubric:: Examples .. code-block:: python user_prompt = build_catalog_summary_user_prompt(context)