Skip to main content
Glama

get-peers

Retrieve the current list of peers directly through the Consul MCP Server, enabling real-time monitoring and coordination of distributed system participants.

Instructions

Get the current peers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'get-peers' tool, including inline handler that calls consul.status.peers() and formats the response as text.
    server.tool(
      "get-peers",
      "Get the current peers",
      {},
      async () => {
        try {
          // @ts-ignore - The Consul type definitions are incomplete
          const peers = await consul.status.peers();
          return { content: [{ type: "text", text: `Current peers:\n\n${peers.join("\n")}` }] };
        } catch (error) {
          console.error("Error getting peers:", error);
          return { content: [{ type: "text", text: "Error getting peers" }] };
        }
      }
    );
  • Handler function for 'get-peers' tool: retrieves peers using consul.status.peers() and returns formatted list or error.
    async () => {
      try {
        // @ts-ignore - The Consul type definitions are incomplete
        const peers = await consul.status.peers();
        return { content: [{ type: "text", text: `Current peers:\n\n${peers.join("\n")}` }] };
      } catch (error) {
        console.error("Error getting peers:", error);
        return { content: [{ type: "text", text: "Error getting peers" }] };
      }
    }
  • Empty input schema for 'get-peers' tool (no parameters required).
    {},
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. It only states the action ('Get the current peers') without any details on traits like read-only vs. destructive behavior, authentication needs, rate limits, or response format. This is a significant gap for a tool with no structured safety hints.

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 ('Get the current peers') with no wasted words. It is front-loaded and appropriately sized for its simple purpose, making it highly concise and well-structured.

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 a tool that likely interacts with a system (e.g., a peer network or cluster), the description is incomplete. It lacks details on what 'peers' entails, the output format, or any behavioral context, and there is no output schema to compensate. This makes it inadequate for informed tool selection.

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?

The input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description does not add parameter information, which is appropriate since there are no parameters to describe. This aligns with the baseline expectation for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get the current peers' states a clear verb ('Get') and resource ('current peers'), providing a basic purpose. However, it lacks specificity about what 'peers' means in this context (e.g., network peers, cluster nodes, or other entities) and does not differentiate from sibling tools like 'get-agent-members' or 'get-catalog-nodes', which might have overlapping functionality. This makes it vague but minimally adequate.

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 does not mention any context, prerequisites, or exclusions, such as when peers might be unavailable or how it relates to sibling tools like 'get-agent-members'. This lack of usage instructions leaves the agent without clear direction.

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

Related 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/kocierik/consul-mcp-server'

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