list_users
Retrieve a paginated list of BoldSign users, with optional filtering by a search term, to manage and navigate user data efficiently.
Instructions
Retrieves a paginated list of BoldSign users, with optional filtering by a search term.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Required. The page number of the user list to retrieve. Used for pagination to navigate through the list of available users. | |
| pageSize | No | Optional. Specifies the maximum number of user records to be retrieved per page. If not provided, a default page size will be used by the BoldSign API. The value must be between 1 and 100. The default value is 10. | |
| search | No | Optional. A string used to filter the user list. The API will return contacts whose details contain this search term. |
Implementation Reference
- src/tools/usersTools/listUsers.ts:29-45 (handler)The handler function that implements the core logic of the list_users tool: creates a UserApi instance, configures it, calls listUsers with page, pageSize, and search parameters, and handles the response or error.async function listUsersHandler(payload: ListUsersSchemaType): Promise<McpResponse> { try { const userApi = new UserApi(); userApi.basePath = configuration.getBasePath(); userApi.setApiKey(configuration.getApiKey()); const userRecords: UserRecords = await userApi.listUsers( payload.page, payload.pageSize ?? undefined, payload.search ?? undefined, ); return handleMcpResponse({ data: userRecords, }); } catch (error: any) { return handleMcpError(error); } }
- Zod input schema for the list_users tool, defining pageSize (int 1-100), page (int >=1 default 1), and optional search string.const ListUsersSchema = z.object({ pageSize: z.number().int().min(1).max(100), page: z.number().int().min(1).default(1), search: commonSchema.OptionalStringSchema.describe( 'Optional. A string used to filter the user list. The API will return contacts whose details contain this search term.', ), });
- src/tools/usersTools/listUsers.ts:19-27 (registration)Tool definition registration for list_users, including method name 'list_users', description, schema, and wrapper handler that delegates to listUsersHandler.export const listUsersToolDefinition: BoldSignTool = { method: ToolNames.ListUsers.toString(), name: 'List users', description: 'Retrieves a paginated list of BoldSign users, with optional filtering by a search term.', inputSchema: ListUsersSchema, async handler(args: unknown): Promise<McpResponse> { return await listUsersHandler(args as ListUsersSchemaType); }, };
- src/tools/usersTools/index.ts:5-5 (registration)Registration of users tools array, including the listUsersToolDefinition.export const usersApiToolsDefinitions: BoldSignTool[] = [getUserToolDefinition, listUsersToolDefinition];
- src/tools/index.ts:8-14 (registration)Main tools definitions array that spreads in usersApiToolsDefinitions, thus registering the list_users tool globally.export const definitions: BoldSignTool[] = [ ...contactsApiToolsDefinitions, ...documentsApiToolsDefinitions, ...templatesApiToolsDefinitions, ...usersApiToolsDefinitions, ...teamsApiToolsDefinitions, ];