Skip to main content
Glama

list_my_submissions

Retrieve your submission history from Orange Juice Online Judge to track code submissions and monitor progress.

Instructions

Fetch the list of latest submissions made by the authenticated user. Returns a JSON string containing the submission histories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
offsetNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for list_my_submissions tool. Decorated with @mcp.tool(), it authenticates the client using get_authenticated_client(), then calls get_submissions with offset, limit, and myself=1 parameters to fetch the user's submissions from the Online Judge API.
    @mcp.tool()
    def list_my_submissions(offset: int = 0, limit: int = 20) -> str:
        """
        Fetch the list of latest submissions made by the authenticated user.
        Returns a JSON string containing the submission histories.
        """
        c = get_authenticated_client()
        try:
            data = c.get_submissions(offset=offset, limit=limit, myself=1)
            return str(data)
        except Exception as e:
            return f"Error: {e}"
  • The @mcp.tool() decorator registers the list_my_submissions function as an MCP tool, making it available to clients of the MCP server.
    @mcp.tool()
  • The get_submissions method in OJClient that performs the actual HTTP GET request to the /api/submissions endpoint with the provided offset, limit, and myself parameters to retrieve submission data from the Online Judge.
    def get_submissions(self, offset=0, limit=20, myself=1):
        params = {'limit': limit, 'offset': offset, 'myself': myself}
        resp = self.session.get(self._get_url("/api/submissions"), params=params, timeout=20)
        resp.raise_for_status()
        return resp.json()

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other 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/wangicheng/oj-mcp-server'

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