Skip to main content
Glama

get-agent-self

Retrieve self-details of the Consul agent, including its configuration and status, to monitor and manage Consul MCP Server operations effectively.

Instructions

Get agent self information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that executes the 'get-agent-self' tool logic: calls consul.agent.self() and formats the response as JSON text.
    async () => {
      try {
        // @ts-ignore - The Consul type definitions are incomplete
        const self = await consul.agent.self();
        return { content: [{ type: "text", text: `Agent Self:\n\n${JSON.stringify(self, null, 2)}` }] };
      } catch (error) {
        console.error("Error getting agent self:", error);
        return { content: [{ type: "text", text: "Error getting agent self" }] };
      }
    }
  • Registration of the 'get-agent-self' tool using server.tool(), including empty input schema {} and inline handler.
      "get-agent-self",
      "Get agent self information",
      {},
      async () => {
        try {
          // @ts-ignore - The Consul type definitions are incomplete
          const self = await consul.agent.self();
          return { content: [{ type: "text", text: `Agent Self:\n\n${JSON.stringify(self, null, 2)}` }] };
        } catch (error) {
          console.error("Error getting agent self:", error);
          return { content: [{ type: "text", text: "Error getting agent self" }] };
        }
      }
    );
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. 'Get agent self information' implies a read-only operation, but it doesn't specify whether this requires authentication, has rate limits, returns structured data, or involves side effects. For a tool with zero annotation coverage, this leaves critical behavioral traits undefined, though it's not contradictory.

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, clear sentence with zero waste. It's front-loaded with the core action and resource, making it easy to parse. Every word earns its place by conveying the essential purpose without fluff or ambiguity.

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 the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on return values, error handling, or operational context. For a basic read operation, this might suffice, but it doesn't provide enough information for an agent to fully understand the tool's behavior without trial and error.

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% description coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, avoiding redundancy. This meets the baseline for tools with no parameters, as it doesn't add unnecessary information beyond the schema.

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 agent self information' clearly states the verb ('Get') and resource ('agent self information'), providing a basic understanding of the tool's function. However, it lacks specificity about what 'agent self information' includes (e.g., configuration, status, identity) and doesn't differentiate from siblings like 'get-agent-members' or 'get-peers', which also retrieve agent-related data. This makes the purpose somewhat vague but not misleading.

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 doesn't mention prerequisites, context (e.g., during agent setup or monitoring), or exclusions. Without annotations or sibling differentiation, an agent must infer usage from the name alone, which is insufficient for optimal tool selection.

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