Skip to main content
Glama

list_famous_contracts

Lists well-known contracts for a selected Neo N3 network (mainnet or testnet).

Instructions

List supported well-known contracts for the selected network.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNoNetwork to use: "mainnet" or "testnet"

Implementation Reference

  • Main handler function that executes the 'list_famous_contracts' tool logic. It calls contractService.listSupportedContracts(), filters for available contracts, and returns the list along with the network name.
    async function handleListFamousContracts(input: Record<string, unknown>, contractService: ContractService): Promise<unknown> {
      try {
        const contracts = await contractService.listSupportedContracts();
        const availableContracts = contracts.filter(contract => contract.available);
        return {
          contracts: availableContracts,
          network: contractService.getNetwork()
        };
      } catch (error) {
        return handleError(error);
      }
    }
  • Tool registration schema defining name, description, and input schema for 'list_famous_contracts'. The input has an optional 'network' parameter restricted to 'mainnet' or 'testnet'.
    {
      name: 'list_famous_contracts',
      description: 'List known famous contracts with their names and script hashes for the active network(s)',
      inputSchema: {
        type: 'object',
        properties: {
           network: {
            type: 'string',
            description: 'Optional: Filter by network ("mainnet" or "testnet"). Defaults to showing contracts for all configured networks.',
            enum: [NeoNetwork.MAINNET, NeoNetwork.TESTNET],
          },
        },
        required: [],
      },
    },
  • Case statement in the callTool switch that routes the 'list_famous_contracts' tool name to the handleListFamousContracts handler.
    case 'list_famous_contracts':
      return await handleListFamousContracts(input, contractService) as Record<string, unknown>;
  • src/index.ts:408-424 (registration)
    MCP server-side tool registration via registerTool() for 'list_famous_contracts' with Zod schema (optional network param) and delegation to callTool().
    // List famous contracts tool
    registerTool(
      'list_famous_contracts',
      'List supported well-known contracts for the selected network.',
      {
        network: z.string().optional().describe('Network to use: "mainnet" or "testnet"'),
      },
      async (args) => {
        try {
          await this.ensureServicesInitialized();
          const result = await callTool('list_famous_contracts', args, this.neoServices, this.contractServices);
          return this.formatDelegatedToolResponse(result);
        } catch (error: unknown) {
          return this.createErrorResponse(error);
        }
      }
    );
  • listSupportedContracts() helper method in ContractService. Iterates over FAMOUS_CONTRACTS definitions, checks each contract's deployment status on the active network, and returns their name, description, availability, operation count, and network.
    async listSupportedContracts(): Promise<Array<{
      name: string,
      description: string,
      available: boolean,
      operationCount: number,
      network: NeoNetwork
    }>> {
      try {
        const contracts = await Promise.all(Object.values(FAMOUS_CONTRACTS).map(async (contract) => {
          const contractName = contract.name;
          const isAvailable = await this.isContractDeployed(contractName);
          const operationCount = Object.keys(contract.operations).length;
    
          return {
            name: contractName,
            description: contract.description,
            available: isAvailable,
            operationCount,
            network: this.network
          };
        }));
    
        return contracts;
      } catch (error) {
        logger.error(`Error listing supported contracts`, {
          error: error instanceof Error ? error.message : String(error),
          network: this.network
        });
        return [];
      }
    }
Behavior2/5

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

No annotations provided. Description does not disclose behavioral traits like auth requirements or data freshness. Only states basic action.

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?

Single sentence, efficient and to the point with no wasted words.

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

Completeness2/5

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

Description is minimal. Does not explain what 'famous contracts' are or if the list is dynamic. Agent may lack full context for correct invocation.

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 covers the parameter with description of allowed values. Description adds no new semantics.

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?

Description clearly states it lists supported well-known contracts for a selected network, with verb and resource. It distinguishes from sibling tools like deploy_contract or get_contract_info.

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?

No guidance on when to use this tool vs alternatives. No context on prerequisites or network availability.

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/r3e-network/neo-n3-mcp'

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