- MQL5 95.7%
- MQL4 4.3%
| Src | ||
| dependencies.json | ||
| LICENSE | ||
| LLmAgentsBasicTools.mqproj | ||
| README.md | ||
A collection of basic and reusable CLLmTool implementations for the TSN/LLM ecosystem. It serves as a foundation template that any project (dashboards, Telegram bots, MCP servers, etc.) can include to instantly provide its LLM agent with generic MT5 utilities without having to rewrite them every time.
Main Features
- get_time: Returns the GMT time, broker server time, local machine time, or the time of the latest tick for a symbol.
- account_info: Returns any
ENUM_ACCOUNT_INFO_DOUBLE,ENUM_ACCOUNT_INFO_INTEGER, orENUM_ACCOUNT_INFO_STRINGproperty of the active account. - terminal_info: Returns any
ENUM_TERMINAL_INFO_DOUBLE,ENUM_TERMINAL_INFO_INTEGER, orENUM_TERMINAL_INFO_STRINGproperty of the terminal. - get_err_description: Converts an MT5 error code into its human-readable description.
- get_expert_logs: Returns the latest lines from the Expert Advisor/terminal log.
All tools are synchronous (they resolve directly through the native MT5 API, without event delegation or waiting for ChartEvent) and return responses in the format:
{"ok":true,"result":...}
or
{"ok":false,"error":"..."}
⚠️ License Activation (Required)
To use these basic tools with CToolsManager, the LLmAgentsByLeoFinal EX5 Library is required.
How to activate
-
Purchase LLmAgentsByLeoFinal:
-
Retrieve your TBP ID from your account:
Installation
cd "C:\Users\YOUR_USER\AppData\Roaming\MetaQuotes\Terminal\YOUR_ID\MQL5\Shared Projects"
tsndep install "https://forge.mql5.io/nique_372/LLmAgentsBasicTools.git"
- Requires the
tsndeppackage, available on PyPI. It automatically downloads and installs all declared dependencies. - If any dependency is private or commercial, installation for that package will fail. Check dependencies.json and contact me to request access.
Quick Start
1. Include the library in your project:
#include <TSN\\LLMBTools\\Main.mqh>
2. Register the basic tools in your CLLmToolsManager:
// Project-specific tools
m_tools.AddItemFast(new CMyCustomTool(...));
//---
CJsonParser* parser = m_tools.JsonParser();
parser.Assing(g_toos_json_shema_myproject); // your own tools.json (via #resource)
parser.CorrectPadingForSwar();
if(!m_tools.Init())
{
LogError("Failed to initialize tools", FUNCION_ACTUAL);
...
}
// Registers get_time, account_info, terminal_info,
// get_err_description and get_expert_logs
if(!CLlmBasictToolsByLeo::Load(m_tools))
{
LogError("Failed to load basic tools", FUNCION_ACTUAL);
...
}
Contact
- Platform: https://www.mql5.com/en/users/nique_372
- Profile: https://www.mql5.com/en/users/nique_372
License
By downloading or using this repository, you agree to the terms of the license.