get_team_components
Retrieve Figma design components for a specific team to access and manage reusable UI elements across projects.
Instructions
Get components 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:31-36 (handler)The primary handler function that fetches Figma team components via API call, handling team_id and pagination parameters.async getTeamComponents(args: GetTeamComponentsArgs) { const { team_id, ...paginationParams } = args; const params = { ...paginationParams }; return this.api.makeRequest(`/teams/${team_id}/components${this.api.buildQueryString(params)}`); }
- src/index.ts:340-360 (registration)MCP tool registration defining the name, description, and JSON input schema for get_team_components.name: 'get_team_components', description: 'Get components 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:12-14 (schema)TypeScript interface for input arguments, extending PaginationParams with required team_id string.export interface GetTeamComponentsArgs extends PaginationParams { team_id: string; }
- src/index.ts:562-568 (registration)Dispatch handler in MCP server that validates args and delegates to projectsHandler.getTeamComponents.case 'get_team_components': { const args = this.validateArgs<GetTeamComponentsArgs>(request.params.arguments, ['team_id']); const result = await this.projectsHandler.getTeamComponents(args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }