Skip to main content
Glama
sellersmith

TailorKit MCP

Official
by sellersmith

get_list_layers_of_template

Retrieve a list of layers for a specific product template by providing the template ID and Shopify domain, enabling efficient management of customizable templates.

Instructions

Get list layers of template with template id and shop domain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
_idYesThe id of the template
shopDomainYesThe shop domain ends with .myshopify.com

Implementation Reference

  • Exports the main handler for the 'get_list_layers_of_template' tool using createHandler, which includes validation and delegates to the service method.
    export const getListLayersOfTemplateHandler = createHandler<GetListLayersOfTemplateArgs, any>(
      validateGetListLayersOfTemplateArgs,
      getListLayersOfTemplateServiceMethod
    );
  • Registers the tool name 'get_list_layers_of_template' to the handler function in the registry.
    this.registry.register(
      TAILOR_KIT_TOOL_NAMES.GET_LIST_LAYERS_OF_TEMPLATE,
      (args: unknown) => getListLayersOfTemplateHandler(this.serviceManager, args)
    );
  • Defines the MCP tool object including name, description, and input schema for 'get_list_layers_of_template'.
    const getListLayersOfTemplateTool: TailorKitTool = {
      name: TAILOR_KIT_TOOL_NAMES.GET_LIST_LAYERS_OF_TEMPLATE,
      description: "Get list layers of template with template id and shop domain",
      inputSchema: {
        type: "object",
        properties: {
          _id: {
            type: "string",
            description: "The id of the template",
          },
          shopDomain: {
            type: "string",
            description: "The shop domain ends with .myshopify.com",
          },
          ...COMMON_TOOL_PROPERTIES,
        },
        required: ["_id", "shopDomain", "prompt", "conversationId", "conversationTitle"],
      },
    };
  • The LayerService method implementing the core logic: POST request to the API endpoint for listing layers of a template.
    async getListLayersOfTemplate<T = any>(args: GetListLayersOfTemplateArgs): Promise<LayerResponse<T>> {
      try {
        const data = await this.client.post<GetListLayersOfTemplateArgs, T>(API_ENDPOINTS.LAYER.GET_LIST_LAYERS_OF_TEMPLATE, args);
        return { data, error: null };
      } catch (error) {
        return {
          data: null,
          error: error instanceof Error ? error : new Error(String(error))
        };
      }
    }
  • TypeScript interface defining the arguments for GetListLayersOfTemplate.
    export interface GetListLayersOfTemplateArgs extends CommonToolArgs {
      /**
       * The id of the template
       */
      _id: string;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what the tool does without behavioral details. It doesn't disclose if this is a read-only operation, potential side effects, error handling, or rate limits, leaving significant gaps for a tool that likely queries data.

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

Conciseness4/5

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

The description is a single, efficient sentence that front-loads the core purpose. It avoids unnecessary words, though it could be slightly more structured by separating purpose from parameter mentions.

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?

Given no annotations and no output schema, the description is incomplete. It lacks details on return values (e.g., what 'layers' entail), error conditions, or behavioral traits, which are critical for a tool with two required parameters and likely data retrieval functionality.

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 both parameters fully. The description adds no additional meaning beyond what's in the schema (e.g., it repeats that template id and shop domain are needed without extra context), meeting the baseline for high coverage.

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 action ('Get list layers') and the resource ('template'), specifying it requires template id and shop domain. It distinguishes from siblings like 'get_detail_template' by focusing on layers rather than template details, but doesn't explicitly contrast with 'get_list_templates' which might list templates rather than layers.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives is provided. The description mentions required parameters but doesn't specify use cases, prerequisites, or exclusions compared to sibling tools like 'get_detail_template' or 'create_template'.

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/sellersmith/tailorkit-mcp'

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