Skip to main content
Glama

scp_create_intent

Create shopping intents with authorized merchants to define customer purchase goals and enable personalized shopping assistance through the Shopper Context Protocol.

Instructions

Create a new shopping intent with a merchant. Domain must be authorized with intent:create scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ai_assistantNoName of the AI assistant
base_intentYesNatural language description of the shopping goal
contextNoAdditional context about the intent
domainYesMerchant domain
mechanismNoHow the intent was createdconversational_ai
visibilityNoWho can see this intentmerchant_only

Implementation Reference

  • The main handler function for the 'scp_create_intent' MCP tool. It validates authorization, retrieves the access token, constructs the request parameters, calls the SCP HTTP client to create the intent, and returns the result.
     * Tool handler: scp_create_intent
     */
    async function handleCreateIntent(domain: string, params: any) {
      const { auth, accessToken } = await checkAuthorizationOrThrow(domain);
      const token = await accessToken;
    
      const data = await scpClient.createIntent(auth.scp_endpoint, token, {
        base_intent: params.base_intent,
        mechanism: params.mechanism || 'conversational_ai',
        ai_assistant: params.ai_assistant,
        ai_session_id: params.ai_session_id,
        context: params.context,
        visibility: params.visibility || 'merchant_only',
        expires_at: params.expires_at
      });
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(data, null, 2)
          }
        ]
      };
    }
  • The input schema definition and description for the 'scp_create_intent' tool, registered in the ListTools response.
    {
      name: 'scp_create_intent',
      description: 'Create a new shopping intent with a merchant. Domain must be authorized with intent:create scope.',
      inputSchema: {
        type: 'object',
        properties: {
          domain: {
            type: 'string',
            description: 'Merchant domain'
          },
          base_intent: {
            type: 'string',
            description: 'Natural language description of the shopping goal'
          },
          context: {
            type: 'object',
            description: 'Additional context about the intent'
          },
          mechanism: {
            type: 'string',
            description: 'How the intent was created',
            default: 'conversational_ai'
          },
          ai_assistant: {
            type: 'string',
            description: 'Name of the AI assistant'
          },
          visibility: {
            type: 'string',
            description: 'Who can see this intent',
            enum: ['merchant_only', 'shared_with_customer'],
            default: 'merchant_only'
          }
        },
        required: ['domain', 'base_intent']
      }
    },
  • src/server.ts:576-577 (registration)
    The switch case in the CallToolRequestSchema handler that routes calls to the scp_create_intent tool to its handler function.
    case 'scp_create_intent':
      return await handleCreateIntent(args.domain as string, args);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the authorization scope requirement, which is useful context. However, it lacks details on what 'create' entails (e.g., is it idempotent, does it return an ID, what happens on failure, rate limits, or permissions beyond scope). For a creation tool with no annotations, this leaves significant gaps in understanding its behavior.

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?

The description is a single, efficient sentence that front-loads the core purpose and includes the critical scope requirement. There is no wasted text, and it's structured to convey essential information without redundancy.

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 moderately complete. It covers the purpose and a key prerequisite (authorization scope), but lacks details on behavioral traits, error handling, or return values. For a creation tool with 6 parameters and no structured safety hints, it should provide more context about what 'create' entails and the outcome.

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 fully documents all 6 parameters. The description adds no additional parameter information beyond implying the 'domain' parameter relates to authorization. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't add meaningful semantics beyond what's already in the schema.

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 action ('Create a new shopping intent') and the target ('with a merchant'), which is specific and actionable. It distinguishes from siblings like scp_get_intents (read vs. create) and scp_update_intent (create vs. update). However, it doesn't fully explain what a 'shopping intent' entails beyond the scope requirement.

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?

The description provides explicit context for when to use this tool: 'Domain must be authorized with intent:create scope.' This gives a clear prerequisite. It doesn't explicitly state when not to use it or name alternatives, but the scope requirement implies usage is conditional on authorization.

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