list_teams
Retrieve and manage teams in your BoldSign organization. View team details like name, members, and dates, with search and pagination options.
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 |
|---|---|---|---|
| pageSize | Yes | ||
| page | 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 main handler function that implements the list_teams tool. It initializes the TeamsApi client, calls listTeams with pagination and search 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 schema defining the input parameters for the list_teams tool: pageSize (1-100), page (default 1), 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.', ), }); type ListTeamsSchemaType = z.infer<typeof ListTeamsSchema>;
- src/tools/teamsTools/listTeams.ts:19-28 (registration)Tool definition registering the 'list_teams' tool, including name, description, input schema, and 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)Registers the listTeamsToolDefinition in the array of teams API tools, which is later aggregated into the main tools list.export const teamsApiToolsDefinitions: BoldSignTool[] = [getTeamToolDefinition, listTeamsToolDefinition];
- src/tools/toolNames.ts:35-39 (helper)Enum definition providing the exact string name 'list_teams' used in the tool method.* Retrieve a paginated list of teams within your BoldSign organization. * This API fetches team details such as team name, users, creation date, and modification date for all listed teams, * with options for filtering using a search term and navigating through pages of results. */ ListTeams = 'list_teams',