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;
        };
      }>;
    }
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 only states the action ('Get details') without revealing any behavioral traits such as required permissions, rate limits, error handling, or response format. For a read operation with zero annotation coverage, this leaves critical gaps in understanding how the tool behaves in practice.

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

Conciseness4/5

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

The description is a single, straightforward sentence with no wasted words, making it appropriately concise. However, it is front-loaded only in the sense that it states the core action immediately, but the brevity comes at the cost of completeness, as it omits necessary details for effective tool use.

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 tool's complexity (a read operation with 1 parameter), lack of annotations, no output schema, and low schema description coverage, the description is incomplete. It fails to address key contextual elements such as what details are returned, error conditions, or dependencies, leaving the agent with insufficient information for reliable operation.

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?

The input schema has 1 parameter with 0% description coverage, meaning the schema provides no semantic context for 'dispute_id'. The description does not compensate by explaining what a dispute_id is, its format, or where to obtain it. This lack of parameter semantics hinders the agent's ability to invoke the tool correctly with appropriate inputs.

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

Purpose2/5

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

The description 'Get details of a dispute' is a tautology that essentially restates the tool name 'get_dispute' without adding meaningful specificity. It uses a generic verb 'Get' and resource 'dispute' but fails to distinguish what type of details are retrieved or how this differs from potential sibling operations. While it minimally indicates a read operation, it lacks the specificity needed for clear differentiation.

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. It does not mention prerequisites (e.g., needing a valid dispute_id), exclusions, or contextual cues for selection among siblings like 'create_payment' or 'list_products'. Without such information, agents must infer usage solely from the name and schema, which is inadequate for informed tool selection.

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