Skip to main content
Glama

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

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