Skip to main content
Glama

get_contract_state

Read raw state entries from a NEAR smart contract. Filter by key prefix to access specific data.

Instructions

Reads raw contract state entries, optionally filtered by key prefix

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNoNEAR network to query (default: mainnet)
key_prefixNoBase64-encoded key prefix to filter state (optional)
contract_idYesThe NEAR account ID of the contract
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It discloses that the tool performs a read operation and that results are raw and optionally filtered by key prefix, but it does not mention return format, pagination, authentication, or any side effects. It adds some context but is not comprehensive.

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 a single concise sentence with no redundant words. It is front-loaded and every word contributes meaning, making it efficient and easy to read.

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?

For a simple read tool with good schema coverage, the description is adequate but lacks return value information (no output schema) and does not explain what the raw state entries look like. It also does not specify prerequisites or limitations, leaving a few gaps in context.

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 the schema fully documents each parameter. The description adds minimal value by mentioning the optional key prefix filter, but this information is already present in the schema. It does not clarify network or contract_id beyond what the schema provides.

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 clearly states a specific action ('Reads raw contract state entries') and resource ('contract state entries'), and the optional key prefix filter adds specificity. It distinguishes itself from siblings like get_contract_metadata and call_view_method by focusing on raw state access.

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 retrieving raw state entries but provides no explicit guidance on when to choose this tool over alternatives, nor does it mention exclusions. It sets context but lacks direct 'when to use' instructions.

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/jim-agent/mcp-near-contract'

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