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
| Name | Required | Description | Default |
|---|---|---|---|
| dispute_id | Yes |
Implementation Reference
- src/index.ts:1292-1304 (handler)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'] } },
- src/index.ts:699-704 (schema)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 }; }
- src/index.ts:201-212 (schema)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; }; }>; }