Skip to main content
Glama

get_team_component_sets

Retrieve component sets for a specified Figma team to access and manage design system elements. Supports pagination for handling large collections.

Instructions

Get component sets for a team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
team_idYesThe team ID
page_sizeNoOptional. Number of items per page
cursorNoOptional. Cursor for pagination

Implementation Reference

  • The core handler function for the 'get_team_component_sets' tool. It extracts the team_id and pagination parameters from args, constructs the query string, and makes an API request to Figma's /teams/{team_id}/component_sets endpoint.
    async getTeamComponentSets(args: GetTeamComponentSetsArgs) {
      const { team_id, ...paginationParams } = args;
      
      const params = { ...paginationParams };
      return this.api.makeRequest(`/teams/${team_id}/component_sets${this.api.buildQueryString(params)}`);
    }
  • src/index.ts:389-410 (registration)
    Registers the tool in the MCP server's listTools response, defining its name, description, and JSON input schema matching GetTeamComponentSetsArgs.
    {
      name: 'get_team_component_sets',
      description: 'Get component sets 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']
      },
    },
  • TypeScript interface for input args: requires team_id, extends PaginationParams (page_size, cursor). Used for type safety in handler and validation.
    export interface GetTeamComponentSetsArgs extends PaginationParams {
      team_id: string;
    }
  • src/index.ts:586-592 (registration)
    Dispatch handler in CallToolRequestSchema switch statement: validates args, calls projectsHandler.getTeamComponentSets, and returns JSON stringified result.
    case 'get_team_component_sets': {
      const args = this.validateArgs<GetTeamComponentSetsArgs>(request.params.arguments, ['team_id']);
      const result = await this.projectsHandler.getTeamComponentSets(args);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/smithery-ai/mcp-figma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server