write_contract

Execute state-changing functions on a smart contract. Requires configured wallet.

Server Tron @bankofai/mcp-server-tron
Category Execute
Risk class High
Parameters 62 required

What write_contract does on Tron

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.

ParameterTypeRequiredDescription
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.

Why write_contract needs a policy

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

Questions about write_contract

What does the write_contract tool do? +

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.

What parameters does write_contract accept? +

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.

How do I enforce a policy on write_contract? +

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.

What risk level is write_contract? +

write_contract is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit write_contract? +

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.

How do I block write_contract completely? +

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.

What MCP server provides write_contract? +

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.

// LOOK UP ANOTHER 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 →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.