thordata-mcp-server 0.4.4__py3-none-any.whl → 0.5.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,9 +108,11 @@ def tool_schema(t: type[ToolRequest]) -> dict[str, Any]:
108
108
  """
109
109
  fields: dict[str, Any] = {}
110
110
  for name, f in t.__dataclass_fields__.items(): # type: ignore[attr-defined]
111
+ required = f.default is dataclasses.MISSING and f.default_factory is dataclasses.MISSING # type: ignore[attr-defined]
111
112
  fields[name] = {
112
113
  "type": getattr(getattr(f.type, "__name__", None), "lower", lambda: str(f.type))(),
113
114
  "default": None if f.default is dataclasses.MISSING else f.default,
115
+ "required": required,
114
116
  }
115
117
 
116
118
  key = tool_key(t)