Spaces:
Sleeping
Sleeping
Jeremiah Lowin commited on
Commit ·
af71ba8
1
Parent(s): 926df22
Only add tags if available
Browse files
src/fastmcp/utilities/components.py
CHANGED
|
@@ -62,7 +62,10 @@ class FastMCPComponent(FastMCPBaseModel):
|
|
| 62 |
|
| 63 |
def get_meta(self) -> dict[str, Any]:
|
| 64 |
"""Get the meta information about the component."""
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
def with_key(self, key: str) -> Self:
|
| 68 |
return self.model_copy(update={"_key": key})
|
|
|
|
| 62 |
|
| 63 |
def get_meta(self) -> dict[str, Any]:
|
| 64 |
"""Get the meta information about the component."""
|
| 65 |
+
if self.tags:
|
| 66 |
+
return {"tags": list(self.tags)} | self.meta
|
| 67 |
+
else:
|
| 68 |
+
return self.meta
|
| 69 |
|
| 70 |
def with_key(self, key: str) -> Self:
|
| 71 |
return self.model_copy(update={"_key": key})
|