Skip to main content
Glama
DynamicEndpoints

PayPal MCP

create_web_profile

Create a PayPal web experience profile to customize checkout branding, shipping options, and payment flow configuration for online stores.

Instructions

Create a web experience profile

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
presentationNo
input_fieldsNo
flow_configNo

Implementation Reference

  • Handler for create_web_profile tool: validates input using validateWebProfile, makes POST request to PayPal API to create web experience profile, returns the JSON response.
    case 'create_web_profile': {
      const args = this.validateWebProfile(request.params.arguments);
      const response = await axios.post<PayPalWebProfile>(
        'https://api-m.sandbox.paypal.com/v1/payment-experience/web-profiles',
        args,
        { headers }
      );
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(response.data, null, 2)
        }]
      };
    }
  • TypeScript interface defining the PayPalWebProfile structure used for input validation and API response typing.
    interface PayPalWebProfile {
      id?: string;
      name: string;
      presentation: {
        brand_name?: string;
        logo_image?: string;
        locale_code?: string;
      };
      input_fields: {
        no_shipping?: number;
        address_override?: number;
      };
      flow_config: {
        landing_page_type?: string;
        bank_txn_pending_url?: string;
      };
    }
  • src/index.ts:1022-1054 (registration)
    Tool registration in listTools handler, specifying name, description, and inputSchema for create_web_profile.
    {
      name: 'create_web_profile',
      description: 'Create a web experience profile',
      inputSchema: {
        type: 'object',
        properties: {
          name: { type: 'string' },
          presentation: {
            type: 'object',
            properties: {
              brand_name: { type: 'string' },
              logo_image: { type: 'string' },
              locale_code: { type: 'string' }
            }
          },
          input_fields: {
            type: 'object',
            properties: {
              no_shipping: { type: 'number' },
              address_override: { type: 'number' }
            }
          },
          flow_config: {
            type: 'object',
            properties: {
              landing_page_type: { type: 'string' },
              bank_txn_pending_url: { type: 'string' }
            }
          }
        },
        required: ['name']
      }
    },
  • Helper function to validate and normalize input arguments for create_web_profile tool according to PayPalWebProfile interface.
    private validateWebProfile(args: unknown): PayPalWebProfile {
      if (typeof args !== 'object' || !args) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid web profile data');
      }
    
      const profile = args as Record<string, unknown>;
      
      if (typeof profile.name !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Missing required profile name');
      }
    
      const webProfile: PayPalWebProfile = {
        name: profile.name,
        presentation: {},
        input_fields: {},
        flow_config: {}
      };
    
      if (profile.presentation && typeof profile.presentation === 'object') {
        const pres = profile.presentation as Record<string, unknown>;
        if (typeof pres.brand_name === 'string') webProfile.presentation.brand_name = pres.brand_name;
        if (typeof pres.logo_image === 'string') webProfile.presentation.logo_image = pres.logo_image;
        if (typeof pres.locale_code === 'string') webProfile.presentation.locale_code = pres.locale_code;
      }
    
      if (profile.input_fields && typeof profile.input_fields === 'object') {
        const fields = profile.input_fields as Record<string, unknown>;
        if (typeof fields.no_shipping === 'number') webProfile.input_fields.no_shipping = fields.no_shipping;
        if (typeof fields.address_override === 'number') webProfile.input_fields.address_override = fields.address_override;
      }
    
      if (profile.flow_config && typeof profile.flow_config === 'object') {
        const flow = profile.flow_config as Record<string, unknown>;
        if (typeof flow.landing_page_type === 'string') webProfile.flow_config.landing_page_type = flow.landing_page_type;
        if (typeof flow.bank_txn_pending_url === 'string') webProfile.flow_config.bank_txn_pending_url = flow.bank_txn_pending_url;
      }
    
      return webProfile;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Create' which implies a write/mutation operation, but doesn't mention permissions needed, whether it's idempotent, rate limits, or what happens on success/failure. This leaves significant gaps for an agent to understand how to use it safely.

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 extremely concise at just four words, with no wasted language. It's front-loaded with the core action and resource. While it may be too brief for completeness, it earns full marks for conciseness.

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

Completeness2/5

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

Given the complexity (4 parameters with nested objects, 0% schema coverage, no output schema, no annotations), the description is insufficient. It doesn't explain what the tool returns, how parameters interact, or provide any context about the web experience profile domain. The agent would struggle to use this effectively.

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

Parameters2/5

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

Schema description coverage is 0%, meaning none of the 4 parameters have descriptions in the schema. The tool description adds no information about what parameters are needed or what they mean (name, presentation, input_fields, flow_config). For a tool with complex nested objects and no schema documentation, this is inadequate.

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

Purpose3/5

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

The description 'Create a web experience profile' clearly states the action (create) and resource (web experience profile), which is better than a tautology. However, it's somewhat vague about what a 'web experience profile' entails and doesn't differentiate from sibling tools like create_invoice or create_product, which also create resources.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There are multiple sibling tools for creating different resources (e.g., create_invoice, create_order), but no indication of when a web experience profile is appropriate or what context it applies to.

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/DynamicEndpoints/Paypal-MCP'

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