list_users
Retrieve a paginated list of BoldSign users with optional search filtering to find specific contacts.
Instructions
Retrieves a paginated list of BoldSign users, with optional filtering by a search term.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageSize | Yes | ||
| page | Yes | ||
| 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 core handler function that implements the list_users tool logic: creates a UserApi instance, calls listUsers API with pagination and search params, handles the response or errors using utility functions.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 schema for input validation: pageSize (1-100), page (default 1), 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)Defines and exports the BoldSignTool object for list_users, including metadata, schema reference, and wrapper handler calling the core logic.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:1-5 (registration)Imports and registers listUsersToolDefinition into the usersApiToolsDefinitions array alongside other user tools.import { getUserToolDefinition } from '../../tools/usersTools/getUser.js'; import { listUsersToolDefinition } from '../../tools/usersTools/listUsers.js'; import { BoldSignTool } from '../../utils/types.js'; export const usersApiToolsDefinitions: BoldSignTool[] = [getUserToolDefinition, listUsersToolDefinition];
- src/tools/toolNames.ts:26-26 (helper)Enum value defining the string identifier 'list_users' for the tool name, used in tool definitions.ListUsers = 'list_users',