Skip to main content
Glama
sellersmith

TailorKit MCP

Official
by sellersmith

get_detail_template

Retrieve detailed product template information using template ID and shop domain to manage customizable templates on Shopify via TailorKit MCP server.

Instructions

Get detail 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

  • Handler for get_detail_template tool that validates args and delegates to template service.
    export const getDetailTemplateHandler = createHandler<GetTemplateArgs, any>(
      validateGetDetailTemplateArgs,
      getDetailTemplateServiceMethod
    );
  • Tool schema definition including input schema, name, and description for get_detail_template.
    const getDetailTemplateTool: TailorKitTool = {
      name: TAILOR_KIT_TOOL_NAMES.GET_DETAIL_TEMPLATE,
      description: "Get detail 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"],
      },
    };
  • Registration of the get_detail_template tool handler in the TemplateHandlerRegistrar.
    this.registry.register(
      TAILOR_KIT_TOOL_NAMES.GET_DETAIL_TEMPLATE,
      (args: unknown) => getDetailTemplateHandler(this.serviceManager, args)
    );
  • Complete implementation block for the get_detail_template handler, including validation, service method, and handler creation.
    function validateGetDetailTemplateArgs(args: GetTemplateArgs): void {
      if (!args._id) {
        throw new Error("Invalid arguments: _id is required");
      }
    
      validateCommonToolArgs(args);
    }
    
    /**
     * Service method for getDetailTemplate
     */
    async function getDetailTemplateServiceMethod(
      serviceManager: ServiceManager,
      args: GetTemplateArgs
    ) {
      return serviceManager.templateService.getDetailTemplate(args);
    }
    
    /**
     * Handler for get_detail_template tool
     */
    export const getDetailTemplateHandler = createHandler<GetTemplateArgs, any>(
      validateGetDetailTemplateArgs,
      getDetailTemplateServiceMethod
    );
  • Service method called by the handler to fetch the detail template via API POST request.
    async getDetailTemplate<T = any>(args: GetTemplateArgs): Promise<TemplateResponse<T>> {
      try {
        const data = await this.client.post<GetTemplateArgs, T>(API_ENDPOINTS.TEMPLATE.GET_DETAIL_TEMPLATE, args);
        return { data, error: null };
      } catch (error) {
        return {
          data: null,
          error: error instanceof Error ? error : new Error(String(error))
        };
      }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves a template but doesn't describe what 'detail' includes, whether it's a read-only operation, potential error conditions, or the response format. This leaves significant gaps in understanding the tool's behavior.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose and parameters without any unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 the lack of annotations and output schema, the description is insufficient for a tool that retrieves data. It doesn't explain what 'detail' entails, the return format, or any behavioral aspects like error handling. For a read operation with no structured output documentation, more context is needed.

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?

The description mentions the two parameters ('template id and shop domain'), but the input schema already provides 100% coverage with clear descriptions for both. The description adds no additional meaning beyond what's in the schema, such as format examples or constraints, so it meets the baseline for high schema 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 detail template') and identifies the required resources ('template id and shop domain'), making the purpose understandable. However, it doesn't differentiate this tool from its sibling 'get_list_templates' (which presumably lists templates rather than retrieving details of a specific one), preventing a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives like 'get_list_templates' or 'create_template'. It mentions the required parameters but doesn't explain the context or prerequisites for invoking this tool, leaving the agent without usage direction.

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