Skip to main content
Glama

view_contract_method

Call a read-only method on NEAR smart contracts without gas. Retrieve on-chain data by providing contract ID, method name, and optional arguments.

Instructions

Call a view (read-only) method on a NEAR smart contract. No gas required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoArguments to pass (JSON object)
contract_idYesContract account ID
method_nameYesView method name to call

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose two genuinely useful facts beyond the schema: the call is read-only and requires no gas/deposit. However it says nothing about failure modes (unknown method, panic/revert, non-existent contract), output encoding, or whether the call is free of side effects — meaningful gaps for a zero-annotation tool.

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?

Two short, front-loaded sentences with zero filler. The core purpose leads and the key behavioral attribute (no gas) follows immediately.

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

Completeness3/5

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

With no output schema and no annotations, the description should at least indicate what a caller gets back (e.g., the deserialized view result) and how errors surface. That return-shape information is absent, though the safety and cost context ('read-only', 'no gas') is covered adequately for a 3-parameter tool.

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

Parameters3/5

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

Schema description coverage is 100%, so contract_id, method_name, and the nested args object are already documented in the schema; the baseline of 3 applies. The description adds no format or type guidance beyond what the schema provides (e.g., how args are serialized for the contract).

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

Purpose4/5

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

The description gives a specific verb+resource combination (call a view/read-only method on a NEAR smart contract) and clearly distinguishes itself from the concrete getter siblings like get_ft_balance or get_account_info. It is not tautological and an agent can tell what class of operation this is. It stops short of explicitly contrasting itself with the fixed-purpose siblings, so a 5 would overstate it.

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

Usage Guidelines2/5

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

There is no guidance on when to reach for this generic call versus the purpose-built siblings (e.g., use view_contract_method for arbitrary/custom methods vs get_ft_balance for standard FT balances). The 'read-only' framing implies a usage boundary but no when/when-not or alternative routing is stated.

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