Jeremiah Lowin commited on
Commit
3135ef6
·
1 Parent(s): e6aef11

Finish removing

Browse files
src/fastmcp/server/openapi.py CHANGED
@@ -122,7 +122,6 @@ class OpenAPITool(Tool):
122
  name: str,
123
  description: str,
124
  parameters: dict[str, Any],
125
- is_async: bool = True,
126
  tags: set[str] = set(),
127
  timeout: float | None = None,
128
  annotations: ToolAnnotations | None = None,
@@ -133,7 +132,6 @@ class OpenAPITool(Tool):
133
  description=description,
134
  parameters=parameters,
135
  fn=self._execute_request, # We'll use an instance method instead of a global function
136
- is_async=is_async,
137
  context_kwarg="context", # Default context keyword argument
138
  tags=tags,
139
  annotations=annotations,
@@ -550,7 +548,6 @@ class FastMCPOpenAPI(FastMCP):
550
  name=tool_name,
551
  description=enhanced_description,
552
  parameters=combined_schema,
553
- is_async=True,
554
  tags=set(route.tags or []),
555
  timeout=self._timeout,
556
  )
 
122
  name: str,
123
  description: str,
124
  parameters: dict[str, Any],
 
125
  tags: set[str] = set(),
126
  timeout: float | None = None,
127
  annotations: ToolAnnotations | None = None,
 
132
  description=description,
133
  parameters=parameters,
134
  fn=self._execute_request, # We'll use an instance method instead of a global function
 
135
  context_kwarg="context", # Default context keyword argument
136
  tags=tags,
137
  annotations=annotations,
 
548
  name=tool_name,
549
  description=enhanced_description,
550
  parameters=combined_schema,
 
551
  tags=set(route.tags or []),
552
  timeout=self._timeout,
553
  )
src/fastmcp/tools/tool.py CHANGED
@@ -40,7 +40,6 @@ class Tool(BaseModel):
40
  name: str = Field(description="Name of the tool")
41
  description: str = Field(description="Description of what the tool does")
42
  parameters: dict[str, Any] = Field(description="JSON schema for tool parameters")
43
- is_async: bool = Field(description="Whether the tool is async")
44
  context_kwarg: str | None = Field(
45
  None, description="Name of the kwarg that should receive context"
46
  )
@@ -74,7 +73,6 @@ class Tool(BaseModel):
74
  raise ValueError("You must provide a name for lambda functions")
75
 
76
  func_doc = description or fn.__doc__ or ""
77
- is_async = inspect.iscoroutinefunction(fn)
78
 
79
  if inspect.ismethod(fn) and hasattr(fn, "__func__"):
80
  sig = inspect.signature(fn.__func__)
@@ -96,7 +94,6 @@ class Tool(BaseModel):
96
  name=func_name,
97
  description=func_doc,
98
  parameters=schema,
99
- is_async=is_async,
100
  context_kwarg=context_kwarg,
101
  tags=tags or set(),
102
  annotations=annotations,
 
40
  name: str = Field(description="Name of the tool")
41
  description: str = Field(description="Description of what the tool does")
42
  parameters: dict[str, Any] = Field(description="JSON schema for tool parameters")
 
43
  context_kwarg: str | None = Field(
44
  None, description="Name of the kwarg that should receive context"
45
  )
 
73
  raise ValueError("You must provide a name for lambda functions")
74
 
75
  func_doc = description or fn.__doc__ or ""
 
76
 
77
  if inspect.ismethod(fn) and hasattr(fn, "__func__"):
78
  sig = inspect.signature(fn.__func__)
 
94
  name=func_name,
95
  description=func_doc,
96
  parameters=schema,
 
97
  context_kwarg=context_kwarg,
98
  tags=tags or set(),
99
  annotations=annotations,