Skip to main content
Glama
mastergo-design

MasterGo Magic MCP

Official

mcp__getComponentLink

Retrieve component documentation data from URLs in the componentDocumentLinks array to generate frontend code based on design components.

Instructions

When the data returned by mcp__getDsl contains a non-empty componentDocumentLinks array, this tool is used to sequentially retrieve URLs from the componentDocumentLinks array and then obtain component documentation data. The returned document data is used for you to generate frontend code based on components.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesComponent documentation link URL, from the componentDocumentLinks property, please ensure the URL is valid

Implementation Reference

  • The execute method implements the core logic of the mcp__getComponentLink tool: fetches component documentation via HTTP GET from the provided URL and returns it as text content, or an error if failed.
    async execute({ url }: z.infer<typeof this.schema>) {
      try {
        const data = await httpUtilInstance.request({
          method: "GET",
          url,
        });
    
        return {
          content: [
            {
              type: "text" as const,
              text: `${data}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                error: "Failed to get component documentation",
                message: error instanceof Error ? error.message : String(error),
              }),
            },
          ],
        };
      }
    }
  • Zod schema defining the single input parameter 'url' which is the component documentation link.
    schema = z.object({
      url: z
        .string()
        .describe(
          "Component documentation link URL, from the componentDocumentLinks property, please ensure the URL is valid"
        ),
    });
  • src/index.ts:36-36 (registration)
    Instantiates and registers the GetComponentLinkTool with the MCP server.
    new GetComponentLinkTool().register(server);
  • The register method in the base class that performs the actual MCP server.tool registration using the tool's name, description, schema, and execute function.
    register(server: McpServer) {
      server.tool(
        this.name,
        this.description,
        this.schema.shape,
        this.execute.bind(this)
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the tool retrieves URLs sequentially and obtains documentation data, but doesn't disclose important behavioral traits like whether this is a read-only operation, potential rate limits, authentication needs, error handling, or what happens if the URL is invalid. The description is insufficient for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is reasonably concise with two sentences, but could be more front-loaded. The first sentence contains multiple clauses that could be simplified. While not verbose, it doesn't achieve the efficiency of top-tier descriptions where every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and a clear purpose in a workflow context, the description is incomplete. It doesn't explain what the returned documentation data looks like, how errors are handled, or important behavioral constraints. The mention of frontend code generation adds context but doesn't compensate for missing operational details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the single 'url' parameter. The description adds marginal value by mentioning the URL comes from 'componentDocumentLinks property' and should be 'valid', but doesn't provide additional syntax, format details, or constraints beyond what the schema provides. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to retrieve URLs from componentDocumentLinks array and obtain component documentation data. It specifies the verb 'retrieve' and resource 'component documentation data', but doesn't explicitly differentiate from sibling tools like mcp__getComponentGenerator or mcp__getDsl beyond mentioning the source array.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some context for when to use this tool ('when the data returned by mcp__getDsl contains a non-empty componentDocumentLinks array'), but doesn't specify when NOT to use it or mention alternatives. It implies a sequential workflow but lacks explicit guidance on prerequisites or comparisons with siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install 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