Skip to main content
Glama

get_contract_role

Identify the role and purpose of a Voi blockchain contract, such as liquidity pool, bridge, or registry, by providing its application ID.

Instructions

Get the role and purpose of a specific contract on Voi (e.g. liquidity-pool, bridge, registry)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appIdYesApplication ID on Voi

Implementation Reference

  • Handler function for get_contract_role tool that looks up a contract by appId, retrieves its role, type, name, protocol, and description from the registry, and returns formatted results
    server.tool(
      "get_contract_role",
      "Get the role and purpose of a specific contract on Voi (e.g. liquidity-pool, bridge, registry)",
      {
        appId: z
          .number()
          .int()
          .describe("Application ID on Voi"),
      },
      async ({ appId }) => {
        const app = findApplication(appId);
        if (!app) {
          return toolResult({
            appId,
            known: false,
            role: null,
            message: `Contract ${appId} is not in the Voi ecosystem registry`,
          });
        }
        const protocol = app.protocol ? findProtocol(app.protocol) : null;
        return toolResult({
          appId,
          known: true,
          role: app.role,
          type: app.type,
          name: app.name,
          protocol: app.protocol,
          protocolName: protocol?.name || null,
          description: app.description,
        });
      },
  • Helper function that looks up an application in the registry by appId, returning null if not found
    export function findApplication(appId) {
      const apps = getApplications();
      return apps[String(appId)] || null;
    }
  • Helper function that finds a protocol by ID to provide protocol name for the application
    export function findProtocol(id) {
      return getProtocols().find((p) => p.id === id) || null;
    }
  • Helper function that formats tool response data as JSON text content for MCP protocol
    export function toolResult(data) {
      return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation ('Get'), but doesn't mention permissions, rate limits, error handling, or output format. For a tool with zero annotation coverage, this lack of behavioral details is a significant gap, though it doesn't contradict any annotations.

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, efficient sentence that front-loads the core purpose with helpful examples. There is no wasted text, making it highly concise and well-structured for quick understanding.

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?

Given the complexity of querying contract roles on a blockchain (Voi), the description is incomplete. With no annotations and no output schema, it lacks details on behavioral traits, return values, or error cases. The description alone doesn't provide enough context for an agent to use the tool effectively beyond basic parameter input.

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?

The schema description coverage is 100%, with the parameter 'appId' fully documented in the schema as 'Application ID on Voi'. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints, so it meets the baseline score of 3.

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 clearly states the action ('Get') and the target ('role and purpose of a specific contract on Voi'), with examples like 'liquidity-pool, bridge, registry' that help distinguish it from siblings like 'get_protocol' or 'identify_application'. However, it doesn't explicitly differentiate from all siblings, such as 'identify_asset' or 'resolve_name', which might also involve contract-related queries.

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?

The description provides no guidance on when to use this tool versus alternatives. It mentions examples of contract roles but doesn't specify prerequisites, exclusions, or direct comparisons to sibling tools like 'get_protocol_contracts' or 'identify_application', leaving the agent to infer usage context.

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/MaidToShelly/UluVoiMCP'

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