Skip to main content
Glama

get_protocol

Retrieve detailed information about Voi ecosystem protocols by ID to understand contract roles, services, and functionality for protocols like HumbleSwap and Nautilus.

Instructions

Get detailed information about a specific Voi ecosystem protocol by ID

Input Schema

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

Implementation Reference

  • The handler function for 'get_protocol' tool. Takes a protocolId parameter, looks up the protocol using findProtocol(), and returns either the protocol details or an error if not found.
    async ({ protocolId }) => {
      const protocol = findProtocol(protocolId);
      if (!protocol) {
        return toolError(`Unknown protocol: ${protocolId}`);
      }
      return toolResult(protocol);
    },
  • Zod schema definition for 'get_protocol' tool input. Defines 'protocolId' as a required string parameter with a description for the protocol identifier.
    {
      protocolId: z
        .string()
        .describe("Protocol identifier (e.g. humble-swap, envoi, aramid-bridge)"),
  • Registration of the 'get_protocol' tool using server.tool(). Includes the tool name, description, input schema, and handler function.
    server.tool(
      "get_protocol",
      "Get detailed information about a specific Voi ecosystem protocol by ID",
      {
        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}`);
        }
        return toolResult(protocol);
      },
    );
  • The findProtocol() helper function that searches the protocols array to find a protocol by ID. Returns the protocol object or null if not found.
    export function findProtocol(id) {
      return getProtocols().find((p) => p.id === id) || null;
    }
  • Helper functions toolResult() and toolError() used to format the tool's response output. toolResult wraps data as JSON content, toolError creates error responses.
    export function toolResult(data) {
      return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
    }
    
    export function toolError(message) {
      return {
        content: [{ type: "text", text: JSON.stringify({ error: message }) }],
        isError: true,
      };
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the behavioral disclosure burden. It only says 'Get detailed information' without disclosing what 'detailed' includes, whether any permissions are needed, or any side effects. As a read-only operation, it is presumably safe, but the description does not explicitly state that or provide any further context beyond the intended 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?

The description is one concise sentence with no filler words, fully front-loaded with the action and resource. Every word earns its place, and it is appropriately compact for a simple tool.

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?

Given that this is a simple tool with one parameter and no output schema, the description provides the essential purpose but lacks specifics about what 'detailed information' includes. It does not describe the return structure or any limitations, which would be useful for the agent. The absence of an output schema increases the need for clarity on the response, but the description remains minimally viable.

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 already fully documents the only parameter protocolId with an example, so schema coverage is 100%. The description adds only the notion that it is an ID, which is slightly redundant with the schema. The baseline of 3 is appropriate since the schema carries the parameter meaning.

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 uses a specific verb 'get' with a specific resource 'protocol' and the modifier 'by ID' clearly distinguishes it from siblings like get_protocols (plural list) and get_protocol_summary (summary). It clearly states the tool returns detailed information for one specific protocol.

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 when you have a specific protocol ID and need detailed info, but it does not explicitly mention when not to use it or recommend alternatives like get_protocols for listing or get_protocol_summary for summaries. The usage context is only implied via the phrase 'specific Voi ecosystem protocol by ID'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.