Skip to main content
Glama
DynamicEndpoints

PayPal MCP

get_dispute

Retrieve detailed information about a specific PayPal dispute by providing its dispute ID to view case details and status.

Instructions

Get details of a dispute

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dispute_idYes

Implementation Reference

  • Handler for 'get_dispute' tool: validates dispute_id, fetches dispute details from PayPal API endpoint, and returns the JSON response.
    case 'get_dispute': { const args = this.validateDisputeParams(request.params.arguments); const response = await axios.get<PayPalDispute>( `https://api-m.sandbox.paypal.com/v1/customer/disputes/${args.dispute_id}`, { headers } ); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] }; }
  • src/index.ts:1085-1095 (registration)
    Registers the 'get_dispute' tool in the MCP server's list of tools, including name, description, and input schema.
    { name: 'get_dispute', description: 'Get details of a dispute', inputSchema: { type: 'object', properties: { dispute_id: { type: 'string' } }, required: ['dispute_id'] } },
  • Input validation function for 'get_dispute' tool parameters, ensuring dispute_id is a string.
    private validateDisputeParams(args: unknown): { dispute_id: string } { if (typeof args !== 'object' || !args || typeof (args as any).dispute_id !== 'string') { throw new McpError(ErrorCode.InvalidParams, 'Invalid dispute ID'); } return { dispute_id: (args as any).dispute_id }; }
  • TypeScript interface defining the expected structure of the PayPal dispute response.
    interface PayPalDispute { id: string; reason: string; status: string; disputed_transactions: Array<{ id: string; amount: { currency_code: string; value: string; }; }>; }

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