Skip to main content
Glama
oxgeneral

tolk-mcp-server

by oxgeneral

compile_tolk

Compile Tolk smart contract source into Fift assembly, base64 BoC, and code hash. Provide source files as a map with entrypoint; standard library imports auto-resolved.

Instructions

Compiles Tolk smart contract source code using @ton/tolk-js. Provide source files as a map of filename→content. The entrypoint file must be included. Standard library imports (@stdlib/*) are resolved automatically. Returns compiled Fift code, BoC (Bag of Cells) in base64, and the code hash.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourcesNoObject mapping filename → source code content. Must include the entrypoint file. Example: {"main.tolk": "fun main(): int { return 0; }"}
optimizationLevelNoOptimization level 0-2 (default: 2). 0 = no optimization, 2 = full optimization
withStackCommentsNoInclude stack layout comments in Fift output (default: false). Useful for debugging
entrypointFileNameYesThe main .tolk file to compile (e.g., "main.tolk")
experimentalOptionsNoSpace-separated experimental compiler flags (advanced usage)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must convey behavioral traits. It discloses the return values (Fift code, BoC base64, code hash) and automatic stdlib import resolution, which is useful. However, it omits details about error behavior, potential side effects, or limitations, leaving moderate transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences, front-loaded with the main verb and purpose. Every sentence provides essential information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (5 parameters, no output schema, no annotations), the description covers the input format, entrypoint requirement, stdlib handling, and return values comprehensively. It lacks explicit mention of error handling or constraints, but the overall context is well-provided.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All parameters are documented in the schema (100% coverage), providing a baseline of 3. The description adds meaningful context by explaining the sources map format and explicitly requiring the entrypoint file to be included in sources, which goes beyond the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Compiles Tolk smart contract source code using @ton/tolk-js', which clearly identifies the verb and resource. It naturally distinguishes from sibling tools like check_tolk_syntax and get_compiler_version by focusing on the compilation action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for compilation and provides some input expectations (sources map, entrypoint inclusion), but it does not explicitly state when to use this tool versus alternatives or mention any exclusions. Sibling tools are not referenced in the description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/oxgeneral/tolk-mcp-server'

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