Skip to content

Make get_started more generic #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Make get_started more generic #24

wants to merge 6 commits into from

Conversation

matteodepalo
Copy link

@matteodepalo matteodepalo commented May 14, 2025

This PR does two main things:

  • Make get_started more generic so that it can be used for any Shopify surface
  • Rename read_polaris_surface_docs to read_docs and make it available outside of the feature flag so that the agent can use it to read any doc page

This will allow us to inject prompts in the agent flow that are specific to each surface we have. We can add these surfaces in the server an never have to touch the client as well if we wish to do so.

To test this you need the add-getting-started branch in shopify-dev, run npm run build in this project and update the cursor mcp settings like so

{
  "mcpServers": {
    "shopify-dev-mcp": {
      "command": "node",
      "args": [
        "/path/to/dev-mcp/dist/index.js"
      ],
      "env": {
        "DEV": "true",
        "POLARIS_UNIFIED": "true"
      }
    }
  }
}

@matteodepalo matteodepalo requested a review from a team as a code owner May 14, 2025 14:39
Copy link
Member

@alex-page alex-page left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, I think this can ship and we can ship a release.

Some concerns (not blocking) going over the code and demo:

  • I feel like we are splitting MCP context between shopify-dev and dev-mcp. I am not a big fan of that. We now have to maintain db/data/dev_assistant/instructions/app-ui.txt in shopify-dev and the surfaces and surface descriptions

    dev-mcp/src/tools/index.ts

    Lines 205 to 215 in b9ab5f9

    const surfaces = [
    ...(process.env.POLARIS_UNIFIED ? ["app-ui"] : []),
    "admin",
    "functions",
    ]
    const surfaceDescriptions: Record<string, string> = {
    "app-ui": "App Home, Admin Extensions, Checkout Extensions, Customer Account Extensions, Polaris Web Components",
    "admin": "Admin API, Admin API GraphQL Schema, Admin API REST Schema",
    "functions": "Shopify Functions, Shopify Functions API",
    };
    . Can't we just centralise this into one place?
  • We shouldn't use the word surface. That is specific to how we describe the different surfaces of the unified Polaris UI libraries like "Checkout", "Admin", "POS"... this is now configured more as sections of the shopify-dev website. I wouldn't describe "functions" as a surface.

},
);

const gettingStartedApis = await fetchGettingStartedApis();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me note that this is only going to be updated when the server is restarted. We can not control that in locally added stdio servers. But the responses are always going to be up-to-date (because the tools fetch them dynamically from shopify.dev), but the description of get_started can be outdated, and it may even conflict with the tool responses. (e.g. if an api has been renamed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants