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" }] }; } } );

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