Skip to main content
Glama
smithery-ai

Shopify Update MCP Server

by smithery-ai

get-shop

Retrieve Shopify store details including configuration, settings, and business information to manage store operations.

Instructions

Get shop details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get-shop' tool. It instantiates a ShopifyClient, calls loadShop with the access token and shop domain, stringifies the shop data, and returns it in the expected MCP format. Handles errors using handleError.
    server.tool("get-shop", "Get shop details", {}, async () => {
      const client = new ShopifyClient();
      try {
        const shop = await client.loadShop(SHOPIFY_ACCESS_TOKEN, MYSHOPIFY_DOMAIN);
        return {
          content: [{ type: "text", text: JSON.stringify(shop, null, 2) }],
        };
      } catch (error) {
        return handleError("Failed to retrieve shop details", error);
      }
    });
  • src/index.ts:541-551 (registration)
    Registers the 'get-shop' tool on the MCP server with description 'Get shop details' and empty input schema.
    server.tool("get-shop", "Get shop details", {}, async () => {
      const client = new ShopifyClient();
      try {
        const shop = await client.loadShop(SHOPIFY_ACCESS_TOKEN, MYSHOPIFY_DOMAIN);
        return {
          content: [{ type: "text", text: JSON.stringify(shop, null, 2) }],
        };
      } catch (error) {
        return handleError("Failed to retrieve shop details", error);
      }
    });
  • Core implementation of shop data retrieval via HTTP GET request to Shopify's /admin/api/{version}/shop.json endpoint using shopifyHTTPRequest method.
    async loadShop(
      accessToken: string,
      shop: string
    ): Promise<LoadStorefrontsResponse> {
      const res = await this.shopifyHTTPRequest<LoadStorefrontsResponse>({
        method: "GET",
        url: `https://${shop}/admin/api/${this.SHOPIFY_API_VERSION}/shop.json`,
        accessToken,
      });
    
      return res.data;
    }
  • Utility function used by the get-shop handler to format and return error responses in MCP format.
    function handleError(
      defaultMessage: string,
      error: unknown
    ): {
      content: { type: "text"; text: string }[];
      isError: boolean;
    } {
      let errorMessage = defaultMessage;
      if (error instanceof CustomError) {
        errorMessage = `${defaultMessage}: ${error.message}`;
      }
      return {
        content: [{ type: "text", text: errorMessage }],
        isError: true,
      };
    }
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 only states the action 'get', implying a read operation, but does not disclose any behavioral traits such as authentication needs, rate limits, error handling, or what the output entails. This is inadequate for a tool with no annotation coverage.

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 extremely concise with 'Get shop details', which is front-loaded and wastes no words. However, it is arguably too brief, bordering on under-specification, as it fails to differentiate from siblings or provide necessary context, slightly reducing its effectiveness.

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 complexity (a read operation with no parameters) and the absence of annotations and output schema, the description is incomplete. It does not explain what 'shop details' include, how the output is structured, or any behavioral aspects, making it insufficient for an agent to use the tool effectively without additional context.

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, so no parameter documentation is needed. The description does not add parameter details, which is appropriate, but it also does not compensate for any gaps since there are none. Baseline 4 is assigned as the schema fully covers the lack of parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get shop details' restates the tool name 'get-shop' with minimal elaboration, making it tautological. It specifies the verb 'get' and resource 'shop details' but lacks specificity about what details are retrieved or how this differs from the sibling tool 'get-shop-details', which has a nearly identical name and purpose.

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 is provided on when to use this tool versus alternatives, particularly the sibling 'get-shop-details'. The description does not mention any context, prerequisites, or exclusions, leaving the agent to infer usage based on tool names alone.

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/smithery-ai/shopify-mcp-server-main-1'

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