Skip to main content
Glama
theagoralabs

Theagora MCP Server

by theagoralabs

my_orders

Read-only

View and filter your open and recent marketplace orders by side, status, and limit to track trading activity on Theagora MCP Server.

Instructions

View your open and recent orders on the exchange.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideNoFilter by side
statusNoFilter by status
limitNoMax results (default 50)

Implementation Reference

  • The my_orders tool handler that executes when the tool is called. It takes the validated input parameters (side, status, limit), passes them to client.listOrders(), and returns the JSON-formatted result.
    async (params) => {
      const result = await client.listOrders({
        side: params.side,
        status: params.status,
        limit: params.limit,
      });
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
      };
    }
  • Input schema for my_orders tool using Zod validation. Defines optional filters for side (BID/ASK), status (OPEN/FILLED/CANCELLED/EXPIRED), and limit (max results).
    {
      side: z.enum(['BID', 'ASK']).optional().describe('Filter by side'),
      status: z.enum(['OPEN', 'FILLED', 'CANCELLED', 'EXPIRED']).optional().describe('Filter by status'),
      limit: z.number().optional().describe('Max results (default 50)'),
    },
  • Complete registration of the my_orders tool with the MCP server. Includes tool name, description, input schema, hints (readOnlyHint, openWorldHint), and the async handler function.
    server.tool(
      'my_orders',
      'View your open and recent orders on the exchange.',
      {
        side: z.enum(['BID', 'ASK']).optional().describe('Filter by side'),
        status: z.enum(['OPEN', 'FILLED', 'CANCELLED', 'EXPIRED']).optional().describe('Filter by status'),
        limit: z.number().optional().describe('Max results (default 50)'),
      },
      { readOnlyHint: true, openWorldHint: true },
      async (params) => {
        const result = await client.listOrders({
          side: params.side,
          status: params.status,
          limit: params.limit,
        });
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
        };
      }
    );
  • API client method that implements the actual HTTP request to /orders endpoint. Accepts optional query parameters (side, status, limit, offset) and returns the orders from the Agora API.
    async listOrders(params?: {
      side?: string;
      status?: string;
      limit?: number;
      offset?: number;
    }): Promise<any> {
      return this.request('/orders', { params: params as any });
    }

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