Skip to main content
Glama
amir-bengherbi

Shopify MCP Server

get-shop-details

Retrieve comprehensive Shopify store information including shipping countries and extended shop details for store management and configuration.

Instructions

Get extended shop details including shipping countries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration and inline handler for the 'get-shop-details' MCP tool. It creates a ShopifyClient instance, calls loadShopDetail with environment variables, stringifies the response as text content, or handles errors.
    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 helper function loadShopDetail in ShopifyClient class that resolves the myshopify domain, executes a GraphQL query to fetch the shop's shipsToCountries, and returns the ShopResponse.
    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;
    }
  • Type definition for ShopResponse, the return type of loadShopDetail, containing the shop's shipping countries.
    export type ShopResponse = {
      data: {
        shop: {
          shipsToCountries: string[];
        };
      };
    };
  • Interface definition in ShopifyClientPort for the loadShopDetail method signature used by the tool handler.
    loadShopDetail(accessToken: string, shop: string): Promise<ShopResponse>;
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.

Install Server

Other 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/amir-bengherbi/shopify-mcp-server'

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