AI agents invoke write_contract to trigger actions in Tron. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
abi | array | — | Optional contract ABI array. If not provided, will fetch from chain. Use for contracts with incomplete on-chain ABI. |
args | array | — | Function arguments (supports arrays and objects for complex types) |
value | string | — | TRX value to send (in Sun) |
network | string | — | Network name. Defaults to mainnet. |
functionName | string | Yes | Function name to call |
contractAddress | string | Yes | The contract address |
Parameters from the server's own tool schema.
Executing state-changing smart contract functions is an irreversible blockchain operation that can transfer assets, alter contract state, or trigger financial operations.
From the tool's definition 'Execute state-changing functions on a smart contract' — explicitly triggers on-chain contract execution with wallet authorization
Attacks that exploit this kind of access
Execute state-changing functions on a smart contract. Requires configured wallet. It is categorised as a Execute tool in the Tron MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
write_contract accepts 6 parameters: abi, args, value, network, functionName, contractAddress. Required: functionName, contractAddress. The full parameter table on this page comes from the server's own tool schema.
Register the Tron MCP server in PolicyLayer and add a rule for write_contract: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Tron. Nothing to install.
write_contract is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the write_contract rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for write_contract. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
write_contract is provided by the Tron MCP server (@bankofai/mcp-server-tron). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →