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
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | MasterGo design file ID (format: file/<fileId> in MasterGo URL) | |
| layerId | Yes | Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL) |
Implementation Reference
- src/tools/get-meta.ts:35-61 (handler)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), }, ], }; } }
- src/tools/get-meta.ts:22-33 (schema)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);