Skip to content

Commit cc35912

Browse files
authored
feat: add title/annotations to admin tools (#273)
These were missed off before.
1 parent 019425c commit cc35912

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/admin.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"fmt"
66

7+
"github.com/mark3labs/mcp-go/mcp"
78
"github.com/mark3labs/mcp-go/server"
89

910
"github.com/grafana/grafana-openapi-client-go/client/org"
@@ -33,6 +34,9 @@ var ListTeams = mcpgrafana.MustTool(
3334
"list_teams",
3435
"Search for Grafana teams by a query string. Returns a list of matching teams with details like name, ID, and URL.",
3536
listTeams,
37+
mcp.WithTitleAnnotation("List teams"),
38+
mcp.WithIdempotentHintAnnotation(true),
39+
mcp.WithReadOnlyHintAnnotation(true),
3640
)
3741

3842
type ListUsersByOrgParams struct{}
@@ -52,6 +56,9 @@ var ListUsersByOrg = mcpgrafana.MustTool(
5256
"list_users_by_org",
5357
"List users by organization. Returns a list of users with details like userid, email, role etc.",
5458
listUsersByOrg,
59+
mcp.WithTitleAnnotation("List users by org"),
60+
mcp.WithIdempotentHintAnnotation(true),
61+
mcp.WithReadOnlyHintAnnotation(true),
5562
)
5663

5764
func AddAdminTools(mcp *server.MCPServer) {

0 commit comments

Comments
 (0)