Skip to main content
Glama

get_workspace_users

Retrieve all users within a specific workspace using the provided workspace ID. Enables efficient user management and integration with Clockify time tracking API.

Instructions

Get all users in a workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesWorkspace ID

Implementation Reference

  • src/index.ts:270-279 (registration)
    Tool registration in the listTools response, including name, description, and input schema.
    name: "get_workspace_users", description: "Get all users in a workspace", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, }, required: ["workspaceId"], }, },
  • src/index.ts:727-729 (registration)
    Dispatch in CallToolRequestSchema handler that validates input and calls the getWorkspaceUsers method.
    if (!args?.workspaceId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId is required'); return await this.getWorkspaceUsers(args.workspaceId as string);
  • Input schema definition for the tool requiring workspaceId.
    inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, }, required: ["workspaceId"], },
  • The main handler function that makes an API request to Clockify to retrieve users in the specified workspace and returns a formatted text response listing the users.
    private async getWorkspaceUsers(workspaceId: string | undefined) { const users = await this.makeRequest(`/workspaces/${workspaceId}/users`); return { content: [ { type: "text", text: `Found ${users.length} user(s) in workspace:\n${users .map((u: User) => `- ${u.name} (${u.email}) - ${u.id}`) .join("\n")}`, }, ], isError: false, }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ratheesh-aot/clockify-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server