Skip to main content
Glama

mcp__getMeta

Retrieve high-level site configuration and design rules by providing a MasterGo design file ID and layer ID. Use the returned markdown rules and results to analyze and build websites.

Instructions

Use this tool when the user intends to build a complete website or needs to obtain high-level site configuration information. You must provide a fileld and layerld to identify the specific design element. This tool returns the rules and results of the site and page. The rules is a markdown file, you must follow the rules and use the results to analyze the site and page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileIdYesMasterGo design file ID (format: file/<fileId> in MasterGo URL)
layerIdYesLayer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)

Implementation Reference

  • The execute method implements the core logic of the mcp__getMeta tool. It fetches metadata using httpUtilInstance.getMeta(fileId, layerId), includes site rules, and returns structured content or error.
    async execute({ fileId, layerId }: z.infer<typeof this.schema>) { try { const result = await httpUtilInstance.getMeta(fileId, layerId); return { content: [ { type: "text" as const, text: JSON.stringify({ result, rules, }), }, ], }; } catch (error: any) { const errorMessage = error.response?.data ?? error?.message; return { isError: true, content: [ { type: "text" as const, text: JSON.stringify(errorMessage), }, ], }; } }
  • Zod schema defining the input parameters: fileId (MasterGo design file ID) and layerId (layer ID). Used for input validation in the MCP tool.
    schema = z.object({ fileId: z .string() .describe( "MasterGo design file ID (format: file/<fileId> in MasterGo URL)" ), layerId: z .string() .describe( "Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)" ), });
  • src/index.ts:37-37 (registration)
    Registers the GetMetaTool instance with the MCP server using its register method, which internally calls server.tool with name, description, schema, and execute handler.
    new GetMetaTool().register(server);

Other Tools

Related Tools

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/mastergo-design/mastergo-magic-mcp'

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