Skip to main content
Glama

agora_get_user_orders

Retrieve a list of all orders placed by the current user within the Agora MCP server, enabling efficient tracking and management of purchase history.

Instructions

Get all orders for the current user. Returns: A list of orders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for 'agora_get_user_orders' tool. It uses the @mcp.tool() decorator for registration, calls get_agora().get_user_orders() to fetch the orders, and processes the response with handle_response.
    @mcp.tool() async def agora_get_user_orders() -> List[Dict]: """ Get all orders for the current user. Returns: A list of orders. """ response = get_agora().get_user_orders() return handle_response(response)
  • Initialization of the FastMCP server instance. All tools are registered to this 'mcp' instance using the @mcp.tool() decorator.
    mcp = FastMCP("Fewsats MCP Server")
  • Shared helper function to get or create the Agora client instance, ensuring initialization happens within tool execution.
    def get_agora(): """Get or create an Agora instance. We want to create the class instance inside the tool, so the init errors will bubble up to the tool and hence the MCP client instead of silently failing during the server creation. """ return Agora()
  • Shared helper function to handle responses from Agora API calls, converting HTTP responses to JSON or text as needed.
    def handle_response(response): """ Handle responses from Agora methods. """ if hasattr(response, 'status_code'): # This is a raw response object try: return response.status_code, response.json() except: return response.status_code, response.text # This is already processed data (like a dictionary) return response

Other Tools

Related 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/Fewsats/agora-mcp'

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