@@ -48,15 +48,19 @@ func UserGet(client *deskclient.Client) server.ServerTool {
48
48
49
49
// UserList returns a list of users that apply to the filters in Teamwork Desk
50
50
func UserList (client * deskclient.Client ) server.ServerTool {
51
+ opts := []mcp.ToolOption {
52
+ mcp .WithDescription ("List all users in Teamwork Desk" ),
53
+ mcp .WithArray ("firstName" , mcp .Description ("The first names of the users to filter by." )),
54
+ mcp .WithArray ("lastName" , mcp .Description ("The last names of the users to filter by." )),
55
+ mcp .WithArray ("email" , mcp .Description ("The email addresses of the users to filter by." )),
56
+ mcp .WithArray ("inboxIDs" , mcp .Description ("The IDs of the inboxes to filter by." )),
57
+ mcp .WithBoolean ("isPartTime" , mcp .Description ("Whether to include part-time users in the results." )),
58
+ }
59
+
60
+ opts = append (opts , paginationOptions ()... )
61
+
51
62
return server.ServerTool {
52
- Tool : mcp .NewTool (string (MethodUserList ),
53
- mcp .WithDescription ("List all users in Teamwork Desk" ),
54
- mcp .WithArray ("firstName" , mcp .Description ("The first names of the users to filter by." )),
55
- mcp .WithArray ("lastName" , mcp .Description ("The last names of the users to filter by." )),
56
- mcp .WithArray ("email" , mcp .Description ("The email addresses of the users to filter by." )),
57
- mcp .WithArray ("inboxIDs" , mcp .Description ("The IDs of the inboxes to filter by." )),
58
- mcp .WithBoolean ("isPartTime" , mcp .Description ("Whether to include part-time users in the results." )),
59
- ),
63
+ Tool : mcp .NewTool (string (MethodUserList ), opts ... ),
60
64
Handler : func (ctx context.Context , request mcp.CallToolRequest ) (* mcp.CallToolResult , error ) {
61
65
// Apply filters to the user list
62
66
firstNames := request .GetStringSlice ("firstName" , []string {})
0 commit comments