This commit is contained in:
18
pkg/annotation/annotation.go
Normal file
18
pkg/annotation/annotation.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package annotation
|
||||
|
||||
import "github.com/mark3labs/mcp-go/mcp"
|
||||
|
||||
func ReadOnly(title string) mcp.ToolAnnotation {
|
||||
t := true
|
||||
return mcp.ToolAnnotation{Title: title, ReadOnlyHint: &t}
|
||||
}
|
||||
|
||||
func Write(title string) mcp.ToolAnnotation {
|
||||
f := false
|
||||
return mcp.ToolAnnotation{Title: title, ReadOnlyHint: &f}
|
||||
}
|
||||
|
||||
func Destructive(title string) mcp.ToolAnnotation {
|
||||
f, t := false, true
|
||||
return mcp.ToolAnnotation{Title: title, ReadOnlyHint: &f, DestructiveHint: &t}
|
||||
}
|
||||
Reference in New Issue
Block a user