assets_get_list
Retrieve available trading instruments from the Finam platform, including symbols and names, to identify assets for market analysis or trading.
Instructions
Получение списка доступных инструментов, их описание (символы, наименование)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/servers/assets.py:23-26 (handler)The handler function `get_list` decorated with `@assets_mcp.tool`, implementing the core logic to retrieve the list of assets via the Finam client. This tool is prefixed to 'assets_get_list' upon mounting.@assets_mcp.tool(tags={"assets"}) async def get_list() -> AssetsResponse: """Получение списка доступных инструментов, их описание (символы, наименование)""" return await get_finam_client().get_assets()
- src/main.py:14-14 (registration)Mounts the `assets_mcp` FastMCP instance with prefix 'assets', which prefixes all its tools including 'get_list' to become 'assets_get_list'.finam_mcp.mount(assets_mcp, prefix="assets")
- src/servers/assets.py:8-8 (registration)Creates the FastMCP server instance named 'FinamAssetsServer' (assets_mcp) where the assets tools, including get_list, are registered.assets_mcp = FastMCP(name="FinamAssetsServer")
- src/tradeapi/client.py:57-60 (helper)Helper method in FinamClient that performs the actual API call to fetch assets and wraps the response in AssetsResponse.async def get_assets(self): assets_client = self.client.assets return AssetsResponse( **await self._exec_request(assets_client, BaseClient.RequestMethod.GET, f"{assets_client._url}"))
- src/servers/utils.py:6-8 (helper)Utility function to retrieve the FinamClient instance from context, used by the handler.def get_finam_client() -> FinamClient: return get_context().get_state("finam_client")