list_teams
Retrieve a paginated list of teams within your BoldSign organization to view team details including members, creation dates, and modification dates with search filtering capabilities.
Instructions
Retrieve a paginated list of teams within your BoldSign organization. This API fetches team details such as team name, users, created date, and modified date for all listed teams, with options for filtering using a search term and navigating through pages of results.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | ||
| pageSize | Yes | ||
| searchKey | No | Optional. A search term to filter the list of teams. The API will return teams whose details, such as name, match the provided search term. |
Implementation Reference
- src/tools/teamsTools/listTeams.ts:30-46 (handler)The handler function listTeamsHandler that instantiates TeamsApi from BoldSign SDK, configures it, calls listTeams with page, pageSize, and searchKey parameters, and handles the response or errors using utility functions.async function listTeamsHandler(payload: ListTeamsSchemaType): Promise<McpResponse> { try { const teamsApi = new TeamsApi(); teamsApi.basePath = configuration.getBasePath(); teamsApi.setApiKey(configuration.getApiKey()); const teamListResponse: TeamListResponse = await teamsApi.listTeams( payload.page, payload.pageSize ?? undefined, payload.searchKey ?? undefined, ); return handleMcpResponse({ data: teamListResponse, }); } catch (error: any) { return handleMcpError(error); } }
- Zod input schema for the list_teams tool, defining required pageSize (1-100), page (min 1, default 1), and optional searchKey.const ListTeamsSchema = z.object({ pageSize: z.number().int().min(1).max(100), page: z.number().int().min(1).default(1), searchKey: commonSchema.OptionalStringSchema.describe( 'Optional. A search term to filter the list of teams. The API will return teams whose details, such as name, match the provided search term.', ), });
- src/tools/teamsTools/listTeams.ts:19-28 (registration)Tool registration definition exporting the BoldSignTool object for list_teams, specifying method name 'list_teams', description, input schema, and a wrapper handler that delegates to listTeamsHandler.export const listTeamsToolDefinition: BoldSignTool = { method: ToolNames.ListTeams.toString(), name: 'List teams', description: 'Retrieve a paginated list of teams within your BoldSign organization. This API fetches team details such as team name, users, created date, and modified date for all listed teams, with options for filtering using a search term and navigating through pages of results.', inputSchema: ListTeamsSchema, async handler(args: unknown): Promise<McpResponse> { return await listTeamsHandler(args as ListTeamsSchemaType); }, };
- src/tools/teamsTools/index.ts:5-5 (registration)Includes listTeamsToolDefinition in the array of teams API tool definitions.export const teamsApiToolsDefinitions: BoldSignTool[] = [getTeamToolDefinition, listTeamsToolDefinition];
- src/tools/index.ts:13-13 (registration)Spreads teamsApiToolsDefinitions (including list_teams) into the main tools definitions array....teamsApiToolsDefinitions,