Skip to main content
Glama
vechain

VeChain MCP Server

Official
by vechain

Get the ABI (or a subset) of a known contract

getContractAbi
Read-onlyIdempotent

Retrieve specific ABI fragments for registered smart contracts to use in transactions or calls, with filters for method names, fragment types, and state mutability.

Instructions

Return the ABI of a contract registered in the server, with optional filters to keep the payload small. Always prefer the most specific filters: pass methodNames: ["balanceOf", "transfer"] to get just those fragments, or stateMutability: "view" to list read-only methods. When called with no filters on a large ABI the server returns only the list of function names and asks you to refine the query (the full ABI would be tens of KB). Use the returned fragments directly in callContract / buildContractTransaction together with the same name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesContract name from listKnownContracts (e.g. "b3tr", "x2EarnApps", "stargateNft", "erc20")
methodNamesNoWhen provided, only fragments whose name is in this list are returned.
fragmentTypeNoRestrict to a single fragment kind. Default returns only functions.function
stateMutabilityNoFilter function fragments by mutability. Use "view" or "pure" for read-only methods.all

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
dataNo
errorNo
networkYes
Behavior4/5

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

Annotations indicate readOnlyHint=true, idempotentHint=true, destructiveHint=false, so the tool is safe. The description adds behavioral context beyond annotations: it reveals that calling without filters on a large ABI returns only function names and asks for refinement, which is important for an agent to understand to avoid unexpected results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is four sentences, well-front-loaded with the main purpose. Each sentence adds value: purpose, preference for filters, behavior with no filters, and how to use the result. It is not overly verbose but could be slightly more concise by removing the suggestion about 'use the returned fragments' which is implied.

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

Completeness4/5

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

Given the tool has 4 parameters, 100% schema coverage, and an output schema, the description does not need to detail return values. It covers the key behaviors: filtering, large ABI warning, and usage with other tools. Missing details like error handling for unknown contracts are minor, so the description is sufficiently complete.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds meaningful context beyond schema: it provides concrete examples for methodNames (e.g., 'balanceOf', 'transfer'), explains the default for fragmentType, and suggests using stateMutability 'view' for read-only methods. This helps in writing correct queries.

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 it returns the ABI of a registered contract, with optional filters to reduce payload size. The verb 'Return' and resource 'ABI of a contract' are specific, and the mention of using fragments with callContract/buildContractTransaction distinguishes this tool from sibling tools that perform different operations.

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

Usage Guidelines4/5

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

The description provides explicit usage advice: prefer the most specific filters, gives examples like methodNames and stateMutability, and explains the server's behavior when no filters are applied on a large ABI. It also suggests using the returned fragments with callContract, but does not explicitly state when not to use this tool or compare to alternatives.

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/vechain/vechain-mcp-server'

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