This commit is contained in:
Lance Galletti 2025-06-27 11:39:51 +02:00 committed by GitHub
commit 0c871c59bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 160 additions and 0 deletions

View file

@ -27,6 +27,15 @@ class ToolParameter(BaseModel):
default: Any | None = None
@json_schema_type
class ToolAnnotations(BaseModel):
title: str | None = None
readOnlyHint: bool | None = None
destructiveHint: bool | None = None
idempotentHint: bool | None = None
openWorldHint: bool | None = None
@json_schema_type
class Tool(Resource):
type: Literal[ResourceType.tool] = ResourceType.tool
@ -34,6 +43,7 @@ class Tool(Resource):
description: str
parameters: list[ToolParameter]
metadata: dict[str, Any] | None = None
annotations: ToolAnnotations | None = None
@json_schema_type
@ -42,6 +52,7 @@ class ToolDef(BaseModel):
description: str | None = None
parameters: list[ToolParameter] | None = None
metadata: dict[str, Any] | None = None
annotations: ToolAnnotations | None = None
@json_schema_type