get_comments
Retrieve comments from a Figma file to review feedback and track design discussions.
Instructions
Get comments on a Figma file
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileKey | Yes | The key of the file to get comments from |
Implementation Reference
- src/handlers/files.ts:60-64 (handler)The core handler function that makes an API request to retrieve comments for a Figma file using the provided fileKey.async getComments(args: GetCommentsArgs) { const { fileKey } = args; return this.api.makeRequest(`/files/${fileKey}/comments`); }
- src/index.ts:221-233 (registration)Tool registration in the listTools response, defining the name, description, and input schema for 'get_comments'.{ name: 'get_comments', description: 'Get comments on a Figma file', inputSchema: { type: 'object', properties: { fileKey: { type: 'string', description: 'The key of the file to get comments from' } }, required: ['fileKey'] },
- src/index.ts:522-527 (registration)Dispatch logic in the CallToolRequest handler that routes 'get_comments' calls to the filesHandler.getComments method.case 'get_comments': { const args = this.validateArgs<GetCommentsArgs>(request.params.arguments, ['fileKey']); const result = await this.filesHandler.getComments(args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], };
- src/types/files.ts:27-29 (schema)TypeScript interface defining the input arguments for the get_comments tool.export interface GetCommentsArgs { fileKey: string; }