list_teams
Retrieve and filter teams from your BoldSign organization with paginated results showing team details like name, users, and creation dates.
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 instantiates the TeamsApi client, calls the listTeams method 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.', ), });
- src/tools/teamsTools/listTeams.ts:19-28 (registration)Tool definition object registering the 'list_teams' tool with MCP, including name, description, input schema, and a wrapper handler that delegates to the main handler.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)Aggregates teams-related tools including listTeamsToolDefinition into an array for higher-level registration.export const teamsApiToolsDefinitions: BoldSignTool[] = [getTeamToolDefinition, listTeamsToolDefinition];
- src/tools/toolNames.ts:39-39 (helper)Enum defining the tool name 'list_teams' used in the tool method identifier.ListTeams = 'list_teams',