Jeremiah Lowin commited on
Commit
007c3be
·
1 Parent(s): 3d12e67

Fix typing issue

Browse files
Files changed (1) hide show
  1. src/fastmcp/server/openapi.py +3 -0
src/fastmcp/server/openapi.py CHANGED
@@ -5,6 +5,7 @@ from __future__ import annotations
5
  import enum
6
  import json
7
  import re
 
8
  from dataclasses import dataclass
9
  from re import Pattern
10
  from typing import TYPE_CHECKING, Any, Literal
@@ -127,6 +128,7 @@ class OpenAPITool(Tool):
127
  tags: set[str] = set(),
128
  timeout: float | None = None,
129
  annotations: ToolAnnotations | None = None,
 
130
  ):
131
  super().__init__(
132
  name=name,
@@ -138,6 +140,7 @@ class OpenAPITool(Tool):
138
  context_kwarg="context", # Default context keyword argument
139
  tags=tags,
140
  annotations=annotations,
 
141
  )
142
  self._client = client
143
  self._route = route
 
5
  import enum
6
  import json
7
  import re
8
+ from collections.abc import Callable
9
  from dataclasses import dataclass
10
  from re import Pattern
11
  from typing import TYPE_CHECKING, Any, Literal
 
128
  tags: set[str] = set(),
129
  timeout: float | None = None,
130
  annotations: ToolAnnotations | None = None,
131
+ serializer: Callable[[Any], str] | None = None,
132
  ):
133
  super().__init__(
134
  name=name,
 
140
  context_kwarg="context", # Default context keyword argument
141
  tags=tags,
142
  annotations=annotations,
143
+ serializer=serializer,
144
  )
145
  self._client = client
146
  self._route = route