oas2mcp.agent.summarizer.models¶
Structured output models for the catalog summarizer agent.
- Purpose:
Define agent-facing structured output models for summarizing an API catalog as a whole before introducing per-operation enhancement agents.
- Design:
Use concise, typed structures that an agent can reliably fill.
Emphasize purpose, conceptual structure, domains, and data model before operational concerns like authentication or MCP surface design.
Keep these models specific to the summarizer workflow.
Examples
summary = CatalogSummary(
catalog_name="Petstore",
api_purpose="Manage pets, store orders, and users.",
conceptual_overview="A demo REST API organized around pets, store operations, and users.",
data_model_summary="The core schemas are Pet, User, Order, and ApiResponse.",
data_flow_summary="The API supports both reads and mutations across core domains.",
authentication_summary="OAuth2 and API key auth are present.",
recommended_mcp_surface="Mostly tools with a few read-oriented resources.",
)
Classes¶
Structured overall summary of a normalized API catalog. |
|
Structured summary for one API tag or domain. |
Module Contents¶
- class oas2mcp.agent.summarizer.models.CatalogSummary(/, **data: Any)[source][source]¶
Bases:
oas2mcp.models.normalized.NormalizedBaseModelStructured overall summary of a normalized API catalog.
- Parameters:
None.
- Returns:
None.
- Raises:
None. –
Examples
summary = CatalogSummary( catalog_name="Petstore", api_purpose="Manage pets, orders, and users.", conceptual_overview="A demo REST API organized around three domains.", data_model_summary="The main schemas are Pet, User, Order, and ApiResponse.", data_flow_summary="Supports both reads and mutations across core domains.", authentication_summary="OAuth2 and API key auth are present.", recommended_mcp_surface="Use tools for actions and selected resources for reads.", )
- primary_domains: list[CatalogTagSummary] = None[source][source]¶
- class oas2mcp.agent.summarizer.models.CatalogTagSummary(/, **data: Any)[source][source]¶
Bases:
oas2mcp.models.normalized.NormalizedBaseModelStructured summary for one API tag or domain.
- Parameters:
None.
- Returns:
None.
- Raises:
None. –
Examples
tag_summary = CatalogTagSummary( tag_name="pet", description="Operations for pet records and media.", operation_count=8, )