get_compiler_version
Retrieve the version of the Tolk compiler. Use this to confirm which compiler version is available.
Instructions
Returns the version of the Tolk compiler (from @ton/tolk-js WASM). Use this to check which compiler version is available.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:51-72 (registration)Registers the 'get_compiler_version' tool on the MCP server with an empty schema; calls getTolkCompilerVersion() from @ton/tolk-js to return the compiler version.
export function registerTools(server: McpServer): void { // ─── Tool 1: get_compiler_version ─────────────────────────────── server.tool( "get_compiler_version", "Returns the version of the Tolk compiler (from @ton/tolk-js WASM). " + "Use this to check which compiler version is available.", {}, async () => { try { const version = await getTolkCompilerVersion(); return { content: [{ type: "text", text: `Tolk compiler version: ${version}` }], }; } catch (err) { return { content: [{ type: "text", text: `Failed to get compiler version: ${getErrorMessage(err)}` }], isError: true, }; } }, ); - src/tools.ts:59-71 (handler)Async handler function that awaits getTolkCompilerVersion() from @ton/tolk-js and returns the version string, with error handling.
async () => { try { const version = await getTolkCompilerVersion(); return { content: [{ type: "text", text: `Tolk compiler version: ${version}` }], }; } catch (err) { return { content: [{ type: "text", text: `Failed to get compiler version: ${getErrorMessage(err)}` }], isError: true, }; } }, - src/tools.ts:58-58 (schema)Empty input schema object ({}) for get_compiler_version, as the tool takes no arguments.
{},