Skip to main content
Glama

list_users

Retrieve paginated user lists from Harvest with filters for active status and update date. Manage user profiles and permissions efficiently.

Instructions

Retrieve a list of users with optional filtering by active status and updated date. Returns paginated results with user profiles and permissions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
is_activeNoFilter by active status
updated_sinceNoFilter by users updated since this timestamp
pageNoPage number for pagination
per_pageNoNumber of users per page (max 2000)

Implementation Reference

  • The ListUsersHandler class which implements the tool's execution logic.
    class ListUsersHandler implements ToolHandler {
      constructor(private readonly config: BaseToolConfig) {}
    
      async execute(args: Record<string, any>): Promise<CallToolResult> {
        try {
          const validatedArgs = validateInput(UserQuerySchema, args, 'users query');
          logger.info('Listing users from Harvest API');
          const users = await this.config.harvestClient.getUsers(validatedArgs);
          
          return {
            content: [{ type: 'text', text: JSON.stringify(users, null, 2) }],
          };
        } catch (error) {
          return handleMCPToolError(error, 'list_users');
        }
      }
    }
  • The registration of the 'list_users' tool, including its name, description, and input schema.
    {
      tool: {
        name: 'list_users',
        description: 'Retrieve a list of users with optional filtering by active status and updated date. Returns paginated results with user profiles and permissions.',
        inputSchema: {
          type: 'object',
          properties: {
            is_active: { type: 'boolean', description: 'Filter by active status' },
            updated_since: { type: 'string', format: 'date-time', description: 'Filter by users updated since this timestamp' },
            page: { type: 'number', minimum: 1, description: 'Page number for pagination' },
            per_page: { type: 'number', minimum: 1, maximum: 2000, description: 'Number of users per page (max 2000)' },
          },
          additionalProperties: false,
        },
      },
      handler: new ListUsersHandler(config),
    },

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/ianaleck/harvest-mcp-server'

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