File tree Expand file tree Collapse file tree 3 files changed +0
-50
lines changed Expand file tree Collapse file tree 3 files changed +0
-50
lines changed Original file line number Diff line number Diff line change @@ -168,41 +168,6 @@ export class FigmaService {
168168 }
169169 }
170170
171- /**
172- * Get a specific page by ID from a file
173- */
174- async getPage ( fileId : string , pageId : string ) : Promise < FigmaNode > {
175- if ( ! pageId || pageId . trim ( ) . length === 0 ) {
176- throw new FigmaError ( 'Page ID is required' , 'INVALID_INPUT' ) ;
177- }
178-
179- try {
180- // Pages are retrieved using the same nodes endpoint since pages are nodes
181- const data = await this . makeRequest < NodeResponse > ( `/files/${ fileId } /nodes?ids=${ pageId } ` ) ;
182-
183- if ( ! data . nodes || ! data . nodes [ pageId ] ) {
184- throw new FigmaNotFoundError ( 'Page' , pageId ) ;
185- }
186-
187- const pageData = data . nodes [ pageId ] ;
188- if ( ! pageData . document ) {
189- throw new FigmaParseError ( 'Invalid page structure received from Figma API' , pageData ) ;
190- }
191-
192- // Verify this is actually a page node
193- if ( pageData . document . type !== 'CANVAS' ) {
194- throw new FigmaError ( `Node ${ pageId } is not a page (type: ${ pageData . document . type } )` , 'INVALID_NODE_TYPE' ) ;
195- }
196-
197- return pageData . document ;
198- } catch ( error ) {
199- if ( error instanceof FigmaError ) {
200- throw error ;
201- }
202- throw new FigmaError ( `Failed to fetch page ${ pageId } : ${ error } ` , 'FETCH_ERROR' ) ;
203- }
204- }
205-
206171 /**
207172 * Get image export URLs
208173 */
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11// src/tools/index.mts
22import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js" ;
3- import { registerFigmaTools } from "./figma.mjs" ;
43import { registerFlutterTools } from "./flutter/index.mjs" ;
54import { registerThemeTools } from "./flutter/theme/colors/theme-tool.mjs" ;
65import { registerTypographyTools } from "./flutter/theme/typography/typography-tool.mjs" ;
76
87export function registerAllTools ( server : McpServer ) {
98 // Register all tool categories
10- registerFigmaTools ( server ) ;
119 registerFlutterTools ( server ) ;
1210 registerThemeTools ( server ) ;
1311 registerTypographyTools ( server ) ;
You can’t perform that action at this time.
0 commit comments