Skip to main content
Glama

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; }

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