Skip to main content
Glama

get_protocol_contracts

Retrieve all application contracts for a specific Voi protocol to identify contract roles and explore ecosystem services.

Instructions

List all known application contracts for a Voi protocol

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
protocolIdYesProtocol identifier (e.g. humble-swap, envoi, aramid-bridge)

Implementation Reference

  • The async handler function that executes the 'get_protocol_contracts' tool logic. It validates the protocol exists using findProtocol(), retrieves contracts via protocolContracts(), assets via protocolAssets(), and returns the combined result.
    async ({ protocolId }) => {
      const protocol = findProtocol(protocolId);
      if (!protocol) {
        return toolError(`Unknown protocol: ${protocolId}`);
      }
      const contracts = protocolContracts(protocolId);
      const assets = protocolAssets(protocolId);
      return toolResult({
        protocol: protocolId,
        name: protocol.name,
        contracts,
        assets,
      });
    },
  • Input schema definition for 'get_protocol_contracts' tool using Zod. Defines a required 'protocolId' string parameter with description.
    {
      protocolId: z
        .string()
        .describe("Protocol identifier (e.g. humble-swap, envoi, aramid-bridge)"),
    },
  • Registration of the 'get_protocol_contracts' tool with the MCP server using server.tool(). Includes tool name, description, schema, and handler.
    server.tool(
      "get_protocol_contracts",
      "List all known application contracts for a Voi protocol",
      {
        protocolId: z
          .string()
          .describe("Protocol identifier (e.g. humble-swap, envoi, aramid-bridge)"),
      },
      async ({ protocolId }) => {
        const protocol = findProtocol(protocolId);
        if (!protocol) {
          return toolError(`Unknown protocol: ${protocolId}`);
        }
        const contracts = protocolContracts(protocolId);
        const assets = protocolAssets(protocolId);
        return toolResult({
          protocol: protocolId,
          name: protocol.name,
          contracts,
          assets,
        });
      },
    );
  • Helper function that retrieves all application contracts for a given protocol ID by filtering the applications registry.
    export function protocolContracts(protocolId) {
      const apps = getApplications();
      const results = [];
      for (const [appId, info] of Object.entries(apps)) {
        if (info.protocol === protocolId) {
          results.push({ appId: Number(appId), ...info });
        }
      }
      return results;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'List' implies a read-only operation, the description doesn't address important behavioral aspects like whether this requires authentication, what format the results are returned in, whether there's pagination, or any rate limits. It provides minimal context beyond the basic purpose.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the essential information.

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?

For a tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'application contracts' are in this context, what data format the list returns, or any behavioral constraints. Given the complexity of protocol/contract systems and the lack of structured metadata, the description should provide more contextual information.

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 input schema has 100% description coverage, with the single parameter 'protocolId' clearly documented in the schema. The description doesn't add any meaningful parameter semantics beyond what's already in the schema (which provides examples like 'humble-swap, envoi, aramid-bridge'). Baseline score of 3 is appropriate when schema does the heavy lifting.

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 ('List') and resource ('all known application contracts for a Voi protocol'), providing a specific verb+resource combination. However, it doesn't explicitly distinguish this tool from sibling tools like 'get_protocol' or 'get_protocol_summary', which might also provide protocol-related information but with different scope.

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. There are multiple sibling tools (e.g., get_protocol, get_protocol_summary) that might overlap in purpose, but the description offers no explicit when/when-not instructions or named 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/MaidToShelly/UluVoiMCP'

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