Skip to main content
Glama
clavia-labs

Shopify Update MCP Server

by clavia-labs

get-shop-details

Retrieve comprehensive Shopify store information including shipping countries and operational details for integration and analysis purposes.

Instructions

Get extended shop details including shipping countries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:553-571 (registration)
    Registration of the 'get-shop-details' MCP tool, including empty input schema and inline handler function that instantiates ShopifyClient and delegates to loadShopDetail method.
    server.tool(
      "get-shop-details",
      "Get extended shop details including shipping countries",
      {},
      async () => {
        const client = new ShopifyClient();
        try {
          const shopDetails = await client.loadShopDetail(
            SHOPIFY_ACCESS_TOKEN,
            MYSHOPIFY_DOMAIN
          );
          return {
            content: [{ type: "text", text: JSON.stringify(shopDetails, null, 2) }],
          };
        } catch (error) {
          return handleError("Failed to retrieve extended shop details", error);
        }
      }
    );
  • Core handler logic in ShopifyClient.loadShopDetail: performs GraphQL query to fetch extended shop details (shipsToCountries). Called by the tool handler.
    async loadShopDetail(
      accessToken: string,
      shop: string
    ): Promise<ShopResponse> {
      const myshopifyDomain = await this.getMyShopifyDomain(accessToken, shop);
    
      const graphqlQuery = gql`
        {
          shop {
            shipsToCountries
          }
        }
      `;
    
      const res = await this.shopifyGraphqlRequest<ShopResponse>({
        url: `https://${myshopifyDomain}/admin/api/${this.SHOPIFY_API_VERSION}/graphql.json`,
        accessToken,
        query: graphqlQuery,
      });
    
      return res.data;
    }
  • Helper method getMyShopifyDomain used by loadShopDetail to resolve the myshopify domain from shop details.
    private async getMyShopifyDomain(
      accessToken: string,
      shop: string
    ): Promise<string> {
      // POST requests are getting converted into GET on custom domain, so we need to retrieve the myshopify domain from the shop object
      const loadedShop = await this.loadShop(accessToken, shop);
      return loadedShop.shop.myshopify_domain;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties
      Added value: +{}
  2. First observed

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves data ('Get'), implying a read-only operation, but doesn't address other behavioral aspects such as authentication requirements, rate limits, error conditions, or response format. The description is minimal and lacks critical operational context.

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 function without unnecessary words. It is front-loaded with the core purpose and includes a specific detail ('shipping countries') that adds value. There is no waste or redundancy, making it highly concise and well-structured.

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 incomplete for a tool that likely returns complex data. It mentions 'extended shop details' and 'shipping countries' but doesn't explain what other details are included, the response structure, or any limitations. For a read operation with no structured output documentation, more context is needed to guide effective use.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description doesn't add parameter details, which is appropriate since there are none to describe. It implies the tool operates without inputs, which aligns with the schema. Baseline is 4 for 0 parameters, as no additional semantic information is needed.

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 with a specific verb ('Get') and resource ('extended shop details'), including the scope of information returned ('including shipping countries'). It distinguishes this from the sibling 'get-shop' tool by specifying 'extended' details, though it doesn't explicitly contrast them. The purpose is not vague or tautological.

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-shop' or other sibling tools. It lacks context about prerequisites, timing, or exclusions. While the 'extended' detail implies more comprehensive information, it doesn't specify when this is necessary over basic shop details.

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