get_team_projects
Retrieve Figma projects for a specific team, supporting pagination to manage large collections efficiently.
Instructions
Get projects for a team
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team_id | Yes | The team ID | |
| page_size | No | Optional. Number of items per page | |
| cursor | No | Optional. Cursor for pagination |
Implementation Reference
- src/handlers/projects.ts:17-22 (handler)The main handler function for the 'get_team_projects' tool. It extracts the team_id and pagination parameters from args, constructs the API endpoint with query string, and calls FigmaApi.makeRequest to fetch the projects.async getTeamProjects(args: GetTeamProjectsArgs) { const { team_id, ...paginationParams } = args; const params = { ...paginationParams }; return this.api.makeRequest(`/teams/${team_id}/projects${this.api.buildQueryString(params)}`); }
- src/index.ts:291-311 (registration)Registration of the 'get_team_projects' tool in the MCP server's listTools response, including name, description, and input schema.{ name: 'get_team_projects', description: 'Get projects for a team', inputSchema: { type: 'object', properties: { team_id: { type: 'string', description: 'The team ID' }, page_size: { type: 'number', description: 'Optional. Number of items per page' }, cursor: { type: 'string', description: 'Optional. Cursor for pagination' } }, required: ['team_id'] },
- src/types/projects.ts:3-5 (schema)TypeScript interface defining the input arguments for getTeamProjects, extending PaginationParams with required team_id.export interface GetTeamProjectsArgs extends PaginationParams { team_id: string; }
- src/index.ts:546-552 (registration)Dispatch handler in the CallToolRequest that routes 'get_team_projects' calls to the projectsHandler.getTeamProjects method.case 'get_team_projects': { const args = this.validateArgs<GetTeamProjectsArgs>(request.params.arguments, ['team_id']); const result = await this.projectsHandler.getTeamProjects(args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }