invoke_contract

Prepare invocation details for a smart contract method. Accepts either a scriptHash or a generic contract reference such as a known name, script hash, or Neo address. If fromWIF is provided, prepares a write transaction; otherwise, performs a read-only query.

Server Neo N3 MCP Server r3e-network/neo-n3-mcp
Category Execute
Risk class High
Parameters 00 required

What invoke_contract does on Neo N3 MCP Server

AI agents invoke invoke_contract to trigger actions in Neo N3 MCP Server. 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.

Why invoke_contract needs a policy

This tool executes arbitrary smart contract methods on the Neo N3 blockchain. While it can perform read-only queries (lower risk), it also prepares write transactions when a private key (fromWIF) is provided, which can modify blockchain state and execute arbitrary contract logic.

From the tool's definition The tool 'invoke_contract' can execute smart contract methods with the capability to prepare write transactions when 'fromWIF is provided'.

Questions about invoke_contract

What does the invoke_contract tool do? +

Prepare invocation details for a smart contract method. Accepts either a scriptHash or a generic contract reference such as a known name, script hash, or Neo address. If fromWIF is provided, prepares a write transaction; otherwise, performs a read-only query. It is categorised as a Execute tool in the Neo N3 MCP Server MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

How do I enforce a policy on invoke_contract? +

Register the Neo N3 MCP Server MCP server in PolicyLayer and add a rule for invoke_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 Neo N3 MCP Server. Nothing to install.

What risk level is invoke_contract? +

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

Can I rate-limit invoke_contract? +

Yes. Add a rate_limit block to the invoke_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 invoke_contract completely? +

Set action: deny in the PolicyLayer policy for invoke_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 invoke_contract? +

invoke_contract is provided by the Neo N3 MCP Server MCP server (r3e-network/neo-n3-mcp). 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.