Skip to main content
Glama
pages.js1.22 kB
/** * figma_list_pages tool * Returns all pages in the current Figma document */ export const pagesTool = { name: 'figma_list_pages', description: 'List all pages in the current Figma document. Returns page IDs, names, and indicates which page is currently active.', inputSchema: { type: 'object', properties: {}, required: [] } }; export async function handleListPages(bridge) { if (!bridge.isConnected()) { return { content: [{ type: 'text', text: JSON.stringify({ error: { code: 'NOT_CONNECTED', message: 'Figma plugin is not connected. Please open Figma and run the Claude Bridge plugin.' } }, null, 2) }], isError: true }; } try { const result = await bridge.sendCommand('list_pages', {}); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: JSON.stringify({ error: { code: error.code || 'UNKNOWN_ERROR', message: error.message } }, null, 2) }], isError: true }; } }

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/magic-spells/figma-mcp-bridge'

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