Skip to main content
Glama
theagoralabs

Theagora MCP Server

by theagoralabs

file_dispute

Destructive

File a dispute for unsatisfactory transaction delivery by providing escrow ID and reason. Available to both buyers and providers in Theagora marketplace.

Instructions

File a dispute for a transaction if delivery was unsatisfactory. Both buyers and providers can dispute. Provide the escrow ID and a clear reason.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
escrowIdYesThe escrow ID to dispute
reasonYesClear explanation of why you are disputing

Implementation Reference

  • Main file_dispute tool handler registered with MCP server. Accepts escrowId and reason parameters, calls client.createDispute(), and returns JSON formatted result.
    server.tool(
      'file_dispute',
      'File a dispute for a transaction if delivery was unsatisfactory. Both buyers and providers can dispute. Provide the escrow ID and a clear reason.',
      {
        escrowId: z.string().describe('The escrow ID to dispute'),
        reason: z.string().describe('Clear explanation of why you are disputing'),
      },
      { destructiveHint: true, idempotentHint: false, openWorldHint: true },
      async (params) => {
        const result = await client.createDispute({
          escrowId: params.escrowId,
          reason: params.reason,
        });
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
        };
      }
    );
  • Zod schema defining input validation for file_dispute tool: escrowId (string) and reason (string) parameters with descriptions.
    {
      escrowId: z.string().describe('The escrow ID to dispute'),
      reason: z.string().describe('Clear explanation of why you are disputing'),
    },
  • AgoraApiClient.createDispute method that performs POST request to /disputes endpoint with escrowId and reason body.
    async createDispute(body: { escrowId: string; reason: string }): Promise<any> {
      return this.request('/disputes', { method: 'POST', body });
    }
  • registerTrustTools function that registers the file_dispute tool with the MCP server.
    export function registerTrustTools(server: McpServer, client: AgoraApiClient) {
    
      // file_dispute — Dispute a transaction
      server.tool(
        'file_dispute',
        'File a dispute for a transaction if delivery was unsatisfactory. Both buyers and providers can dispute. Provide the escrow ID and a clear reason.',
        {
          escrowId: z.string().describe('The escrow ID to dispute'),
          reason: z.string().describe('Clear explanation of why you are disputing'),
        },
        { destructiveHint: true, idempotentHint: false, openWorldHint: true },
        async (params) => {
          const result = await client.createDispute({
            escrowId: params.escrowId,
            reason: params.reason,
          });
          return {
            content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
          };
        }
      );
  • src/index.ts:27-27 (registration)
    Registration of trust tools group (including file_dispute) in the main server setup.
    registerTrustTools(server, client);

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/theagoralabs/mcp'

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