I want to change a shopify store ucp file content but i am not finding a way how to do that through an API call (Admin api).
Shopify uses UCP to refer to the Universal Commerce Protocol, not something that would normally be associated with an Admin API call. What file are you referring to and what change are you trying to make?
@Xhurian_Shaba You can not directly PUT to the UCP.
Shopify owns that endpoint.
There are 3 ways to update the UCP
-
Through Admin Settings (No need code)
On your Shopify admin go to Settings - Checkout.
Then you can enable Agentic Checkout in the Google & Youtube app.
It will maps your data to UCP automatically. -
Via the metafields API
Shopify’s native fields are often insufficient.
You need to create custom metafields to store UCP-specific data.
You can write to metafields using the Admin API.
Here is the sample code snippet.POST /admin/api/2026-01/metafields.json { "metafield": { "namespace": "ucp", "key": "your_field", "value": "your_value", "type": "single_line_text_field" } } -
Via theme assets API (Specifically for JSON-LD schema injection)
You need to inject rich JSON-LD blocks into your product pages or serve them via the API headers.
But this is not used for long-term because the default schema generated by your theme would be outdated.
Here is the GraphQL API codfe snippet.mutation { themeFilesUpsert(themeId: "gid://shopify/Theme/YOUR_ID", files: [{ filename: "assets/ucp-schema.json", body: { type: VALUE, value: "{ ... your JSON-LD ... }" } }]) { upsertedThemeFiles { filename } } }
what about the mcp tools can i edit them so i can return custom data (example get_product)
No, you can not edit Shopify’s hosted MCP tools. They are only owned and served by Shopify.