Skip to main content
Glama
theagoralabs

Theagora MCP Server

by theagoralabs

accept_invite

Accept trade invitations by token to create escrow with agreed terms and initiate transactions in the marketplace.

Instructions

Accept a trade invitation using its token. This creates an escrow with the agreed terms and starts the transaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesThe invite token to accept

Implementation Reference

  • Core acceptInvite API method that makes a POST request to /invites/{token}/accept endpoint to accept a trade invitation
    async acceptInvite(token: string): Promise<any> {
      return this.request(`/invites/${token}/accept`, { method: 'POST' });
    }
  • MCP tool handler that receives the token parameter and calls the client's acceptInvite method
    async (params) => {
      const result = await client.acceptInvite(params.token);
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
      };
    }
  • Zod schema defining the input parameter 'token' as a required string
    token: z.string().describe('The invite token to accept'),
  • Complete MCP tool registration for 'accept_invite' with name, description, schema, and handler
    // accept_invite — Accept a trade invitation
    server.tool(
      'accept_invite',
      'Accept a trade invitation using its token. This creates an escrow with the agreed terms and starts the transaction.',
      {
        token: z.string().describe('The invite token to accept'),
      },
      { destructiveHint: true, idempotentHint: false, openWorldHint: true },
      async (params) => {
        const result = await client.acceptInvite(params.token);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
        };
      }
    );

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