list_contacts
Retrieve and manage a paginated list of contacts from your BoldSign organization. Filter by search term, specify page number, and choose between personal or organizational contacts for efficient signer detail management.
Instructions
This tool allows you to retrieve a paginated list of contacts from your BoldSign organization. You can specify the page number to navigate through the results, the number of contacts to display per page, an optional search term to filter contacts, and the type of contacts to retrieve (your personal contacts or all organizational contacts). Contacts are primarily used to store signer details, identified by their unique email address, for use when creating and sending documents for signature within the BoldSign application.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contactType | No | Optional. Filters the list of contacts based on their type. 'MyContacts' retrieves contacts specifically associated with your account, while 'AllContacts' (default) retrieves all accessible contacts within your organization. | AllContacts |
| page | No | Required. The page number of the contact list to retrieve. Used for pagination to navigate through the list of available contacts. | |
| pageSize | No | Optional. Specifies the maximum number of contact 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. | |
| searchKey | No | Optional. A string used to filter the contact list. The API will return contacts whose details contain this search term. |
Implementation Reference
- The handler function that executes the tool logic: initializes ContactsApi, calls contactUserList with parameters (page, pageSize, searchKey, contactType), handles response with handleMcpResponse, and errors with handleMcpError.async function listContactsHandler(payload: ListContactsSchemaType): Promise<McpResponse> { try { const contactsApi = new ContactsApi(); contactsApi.basePath = configuration.getBasePath(); contactsApi.setApiKey(configuration.getApiKey()); const contactsList: ContactsList = await contactsApi.contactUserList( payload.page, payload.pageSize ?? undefined, payload.searchKey ?? undefined, payload.contactType ?? undefined, ); return handleMcpResponse({ data: contactsList, }); } catch (error: any) { return handleMcpError(error); } }
- Zod schema defining input parameters for the list_contacts tool: pageSize (1-100), page (default 1), optional searchKey, contactType enum (default 'AllContacts').const ListContactsSchema = z.object({ pageSize: z.number().int().min(1).max(100), page: z.number().int().min(1).default(1), searchKey: commonSchema.OptionalStringSchema.describe( 'Optional. A string used to filter the contact list. The API will return contacts whose details contain this search term.', ), contactType: z .enum(['MyContacts', 'AllContacts']) .optional() .nullable() .default('AllContacts') .describe( "Optional. Filters the list of contacts based on their type. 'MyContacts' retrieves contacts specifically associated with your account, while 'AllContacts' (default) retrieves all accessible contacts within your organization.", ), });
- src/tools/contactsTools/listContacts.ts:27-36 (registration)Primary registration of the list_contacts tool as BoldSignTool, specifying method name, description, input schema, and delegating to the handler.export const listContactsToolDefinition: BoldSignTool = { method: ToolNames.ListContacts.toString(), name: 'List contacts', description: 'This tool allows you to retrieve a paginated list of contacts from your BoldSign organization. You can specify the page number to navigate through the results, the number of contacts to display per page, an optional search term to filter contacts, and the type of contacts to retrieve (your personal contacts or all organizational contacts). Contacts are primarily used to store signer details, identified by their unique email address, for use when creating and sending documents for signature within the BoldSign application.', inputSchema: ListContactsSchema, async handler(args: unknown): Promise<McpResponse> { return await listContactsHandler(args as ListContactsSchemaType); }, };
- src/tools/contactsTools/index.ts:5-8 (registration)Includes list_contacts tool definition in the contactsApiToolsDefinitions array for further registration/export.export const contactsApiToolsDefinitions: BoldSignTool[] = [ getContactToolDefinition, listContactsToolDefinition, ];