Make server tool http based

This commit is contained in:
Xin Wang
2026-02-11 11:39:45 +08:00
parent 80e1d24443
commit 4c46793169
9 changed files with 281 additions and 17 deletions

View File

@@ -92,6 +92,10 @@ class ToolResource(Base):
description: Mapped[str] = mapped_column(String(512), nullable=False, default="")
category: Mapped[str] = mapped_column(String(32), nullable=False, default="system") # system/query
icon: Mapped[str] = mapped_column(String(64), nullable=False, default="Wrench")
http_method: Mapped[str] = mapped_column(String(16), nullable=False, default="GET")
http_url: Mapped[Optional[str]] = mapped_column(String(1024), nullable=True)
http_headers: Mapped[dict] = mapped_column(JSON, default=dict)
http_timeout_ms: Mapped[int] = mapped_column(Integer, default=10000)
enabled: Mapped[bool] = mapped_column(default=True)
is_system: Mapped[bool] = mapped_column(default=False)
created_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow)