Skip to main content
Glama

scp_get_preferences

Retrieve saved customer preferences including sizes, styles, and addresses from authorized merchants to personalize shopping experiences.

Instructions

Get saved customer preferences (sizes, styles, addresses) from a merchant. Domain must be authorized first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesMerchant domain

Implementation Reference

  • The primary MCP tool handler for scp_get_preferences. Checks authorization, retrieves valid access token, calls the HTTP client to fetch preferences via JSON-RPC, and returns the result as formatted text.
    async function handleGetPreferences(domain: string) { const { auth, accessToken } = await checkAuthorizationOrThrow(domain); const token = await accessToken; const data = await scpClient.getPreferences(auth.scp_endpoint, token); return { content: [ { type: 'text', text: JSON.stringify(data, null, 2) } ] }; }
  • src/server.ts:432-445 (registration)
    Tool registration in the ListTools response, including name, description, and input schema.
    { name: 'scp_get_preferences', description: 'Get saved customer preferences (sizes, styles, addresses) from a merchant. Domain must be authorized first.', inputSchema: { type: 'object', properties: { domain: { type: 'string', description: 'Merchant domain' } }, required: ['domain'] } },
  • Input schema definition for the scp_get_preferences tool, specifying the required 'domain' parameter.
    inputSchema: { type: 'object', properties: { domain: { type: 'string', description: 'Merchant domain' } }, required: ['domain'] }
  • Helper function in HTTP client that wraps the JSON-RPC call to the merchant's scp.get_preferences endpoint.
    export async function getPreferences( endpoint: string, accessToken: string ): Promise<any> { return makeRPCRequest(endpoint, accessToken, 'scp.get_preferences'); }

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/shopper-context-protocol/scp-mcp-wrapper'

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