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');
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions the authorization requirement, which is useful behavioral context. However, it doesn't disclose other traits like whether this is a read-only operation, potential rate limits, error conditions, or what the return format looks like (e.g., JSON structure). For a tool with zero annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with zero waste: the first states the purpose with examples, and the second provides a critical prerequisite. Every word earns its place, and the information is front-loaded appropriately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is minimally complete for a simple read operation. It covers the purpose and a key prerequisite, but lacks details on return values, error handling, or behavioral nuances that would be helpful for an agent invoking this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the single 'domain' parameter. The description adds marginal value by reinforcing that it's a 'Merchant domain' and tying it to the authorization context, but doesn't provide additional syntax or format details beyond what the schema provides.

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

Purpose4/5

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

The description clearly states the verb 'Get' and resource 'saved customer preferences' with specific examples (sizes, styles, addresses) and source (from a merchant). It distinguishes from siblings like scp_get_orders or scp_get_offers by focusing on preferences, but doesn't explicitly contrast them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides clear context with the prerequisite 'Domain must be authorized first', which implicitly suggests using scp_authorize or scp_check_authorization first. However, it doesn't explicitly name alternatives or specify when-not-to-use scenarios beyond the authorization requirement.

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

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