Skip to main content
Glama
akari2600

figma-developer-docs-mcp

by akari2600

read-figma-developer-docs-pages

Retrieve Figma developer documentation pages by specifying paths to access Plugin, Widget, and REST API content for development tasks.

Instructions

Read specific pages of the Figma developer documentation. Provide page paths from the index (e.g., '/docs/plugins/api/TextNode', '/docs/rest-api/authentication'). Returns the full markdown content of each requested page. You can request multiple pages at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesArray of documentation page paths to read (e.g., ['/docs/plugins/api/TextNode', '/docs/plugins/working-with-text'])

Implementation Reference

  • Implementation of the "read-figma-developer-docs-pages" tool, which retrieves markdown content for specified documentation page paths.
    server.registerTool(
      "read-figma-developer-docs-pages",
      {
        title: "Read Figma Developer Docs Pages",
        description:
          "Read specific pages of the Figma developer documentation. Provide page paths from the index (e.g., '/docs/plugins/api/TextNode', '/docs/rest-api/authentication'). Returns the full markdown content of each requested page. You can request multiple pages at once.",
        inputSchema: {
          paths: z
            .array(z.string())
            .describe(
              "Array of documentation page paths to read (e.g., ['/docs/plugins/api/TextNode', '/docs/plugins/working-with-text'])"
            ),
        },
      },
      async ({ paths }) => {
        const results: string[] = [];
    
        for (const path of paths) {
          const content = loadPage(path);
          if (content) {
            results.push(`--- Page: ${path} ---\n\n${content}`);
          } else {
            results.push(
              `--- Page: ${path} ---\n\nPage not found. Use read-figma-developer-docs-index to see available pages.`
            );
          }
        }
    
        return {
          content: [{ type: "text" as const, text: results.join("\n\n") }],
        };
      }
    );
  • Helper function used by the tool to read a specific markdown file from the documentation directory based on a given path.
    function loadPage(docPath: string): string | null {
      let normalizedPath = docPath.startsWith("/") ? docPath : "/" + docPath;
      normalizedPath = normalizedPath.replace(/\/$/, "");
      if (!normalizedPath) normalizedPath = "/index";
    
      const filePath = join(DOCS_DIR, normalizedPath + ".md");
      if (!existsSync(filePath)) return null;
      return readFileSync(filePath, "utf-8");
    }

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/akari2600/figma-developer-docs-mcp'

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