my_purchases
View your transaction history as a buyer, showing all escrows created, their states, and settlement outcomes.
Instructions
View your transaction history as a buyer. Shows all escrows you have created, their states, and settlement outcomes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/buying.ts:51-63 (handler)The my_purchases tool registration and handler function. It calls client.getTransactions() to retrieve the buyer's transaction history and returns the results as formatted JSON.
// my_purchases — View transaction history server.tool( 'my_purchases', 'View your transaction history as a buyer. Shows all escrows you have created, their states, and settlement outcomes.', {}, { readOnlyHint: true, openWorldHint: true }, async () => { const result = await client.getTransactions(); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; } ); - src/tools/buying.ts:55-55 (schema)Input schema for my_purchases tool - empty object indicating no parameters are required.
{}, - src/index.ts:23-23 (registration)Registration point where registerBuyingTools is called to register the my_purchases tool along with other buying-related tools.
registerBuyingTools(server, client); - src/client.ts:148-150 (helper)The AgoraApiClient.getTransactions() method implementation that makes the actual HTTP request to /transactions endpoint.
async getTransactions(): Promise<any> { return this.request('/transactions'); }