Skip to main content
Glama

get_compiler_version

Check the available Tolk compiler version for TON blockchain smart contracts to verify compatibility before development.

Instructions

Returns the version of the Tolk compiler (from @ton/tolk-js WASM). Use this to check which compiler version is available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for get_compiler_version that calls getTolkCompilerVersion() from @ton/tolk-js and returns the Tolk compiler version as text, with error handling
    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: any) {
          return {
            content: [{ type: "text", text: `Failed to get compiler version: ${err.message}` }],
            isError: true,
          };
        }
      },
    );
  • src/tools.ts:50-68 (registration)
    Tool registration with server.tool() that registers get_compiler_version with its name, description, and handler
    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: any) {
          return {
            content: [{ type: "text", text: `Failed to get compiler version: ${err.message}` }],
            isError: true,
          };
        }
      },
    );
  • Input schema definition - empty object indicates the tool takes no input parameters
    {},
  • Import of getTolkCompilerVersion function from @ton/tolk-js library used by the handler
    import { getTolkCompilerVersion, runTolkCompiler } from "@ton/tolk-js";
  • src/index.ts:26-26 (registration)
    Main entry point that calls registerTools to register all tools including get_compiler_version
    registerTools(server);

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/izzzzzi/iz-tolk-mcp'

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