Skip to main content
Glama

list_users

Retrieve a paginated list of BoldSign users with optional search filtering to find specific team members or contacts in your e-signature platform.

Instructions

Retrieves a paginated list of BoldSign users, with optional filtering by a search term.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYes
pageSizeYes
searchNoOptional. A string used to filter the user list. The API will return contacts whose details contain this search term.

Implementation Reference

  • Core implementation of the list_users tool: creates UserApi instance, calls listUsers with page, pageSize, search parameters, handles response and 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 input schema for the list_users tool defining pageSize (1-100), page (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.', ), });
  • Registers the list_users tool definition with MCP-compatible structure: method name 'list_users', description, input schema, and wrapper handler delegating to the core handler.
    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); }, };
  • Aggregates all tool definitions including usersApiToolsDefinitions (which contains listUsersToolDefinition) into the main definitions array used by the MCP server.
    export const definitions: BoldSignTool[] = [ ...contactsApiToolsDefinitions, ...documentsApiToolsDefinitions, ...templatesApiToolsDefinitions, ...usersApiToolsDefinitions, ...teamsApiToolsDefinitions, ];
  • src/index.ts:22-60 (registration)
    Final MCP server registration: handles ListToolsRequest by listing all tools from definitions (including list_users), and CallToolRequest by finding and executing the matching tool's handler with input validation.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: definitions.map((toolDefinition: BoldSignTool) => { return { name: toolDefinition.method, description: toolDefinition.description, inputSchema: zodToJsonSchema(toolDefinition.inputSchema), }; }), })); server.setRequestHandler(CallToolRequestSchema, async (request) => { const toolName = request.params.name; const tool = definitions.find((t) => t.method === toolName); if (!tool) { throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${toolName}`); } const args = request.params.arguments; const schemaResult = tool.inputSchema.safeParse(args); if (!schemaResult.success) { throw new McpError( ErrorCode.InvalidParams, `Invalid parameters for tool ${toolName}: ${schemaResult.error.message}`, ); } try { const result = await tool.handler(args); return { content: [{ type: 'text', text: `${toJsonString(result)}` }], }; } catch (error) { console.error('[Error] Failed to fetch data:', error); const errorMessage = error instanceof Error ? error.message : String(error); throw new McpError(ErrorCode.InternalError, `API error: ${errorMessage}`); } });

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/Synctest-hub/boldsign-mcp'

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