--- title: components sidebarTitle: components --- # `fastmcp.server.openapi.components` OpenAPI component implementations: Tool, Resource, and ResourceTemplate classes. ## Classes ### `OpenAPITool` Tool implementation for OpenAPI endpoints. **Methods:** #### `run` ```python run(self, arguments: dict[str, Any]) -> ToolResult ``` Execute the HTTP request using RequestDirector for simplified parameter handling. ### `OpenAPIResource` Resource implementation for OpenAPI endpoints. **Methods:** #### `read` ```python read(self) -> str | bytes ``` Fetch the resource data by making an HTTP request. ### `OpenAPIResourceTemplate` Resource template implementation for OpenAPI endpoints. **Methods:** #### `create_resource` ```python create_resource(self, uri: str, params: dict[str, Any], context: 'Context | None' = None) -> Resource ``` Create a resource with the given parameters.