File size: 1,041 Bytes
079ae3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# envs/finqa_env/client.py
"""
Client for the FinQA environment.

This client connects to a running FinQA environment server and provides
a Python interface for interacting with it via MCP tools. Async by default.

Example:
    >>> from envs.finqa_env import FinQAEnv
    >>>
    >>> async with FinQAEnv(base_url="http://localhost:8000") as env:
    ...     await env.reset()
    ...     tools = await env.list_tools()
    ...     result = await env.call_tool("get_descriptions", company_name="alphabet")
    ...     print(result)
    ...     result = await env.call_tool("submit_answer", answer="6.118")
"""

from openenv.core.mcp_client import MCPToolClient


class FinQAEnv(MCPToolClient):
    """
    Client for the FinQA environment.

    Inherits all functionality from MCPToolClient:
    - list_tools(): Discover available tools
    - call_tool(name, **kwargs): Call a tool by name
    - reset(**kwargs): Reset the environment
    - step(action): Execute an action
    """

    pass  # MCPToolClient provides all needed functionality