Skip to main content

fastmcp.utilities.openapi.director

Request director using openapi-core for stateless HTTP request building.

Classes

RequestDirector

Builds httpx2.Request objects from HTTPRoute and arguments using openapi-core. Methods:

build

Constructs a final httpx2.Request object, handling all OpenAPI serialization. Args:
  • route: HTTPRoute containing OpenAPI operation details
  • flat_args: Flattened arguments from LLM (may include suffixed parameters)
  • base_url: Base URL for the request
Returns:
  • httpx2.Request: Properly formatted HTTP request