reload-agent
Reloads the agent configuration for Consul MCP Server, enabling updated settings to take effect immediately without restarting the agent.
Instructions
Reload agent configuration
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "reload-agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/consulTools.ts:703-712 (handler)The handler function for the "reload-agent" tool. It calls `consul.agent.reload()` to reload the Consul agent's configuration and returns a success or error message.
async () => { try { // @ts-ignore - The Consul type definitions are incomplete await consul.agent.reload(); return { content: [{ type: "text", text: "Agent configuration reloaded successfully" }] }; } catch (error) { console.error("Error reloading agent:", error); return { content: [{ type: "text", text: "Error reloading agent configuration" }] }; } } - src/tools/consulTools.ts:699-713 (registration)Registration of the "reload-agent" tool via `server.tool()`. It has no input parameters (empty schema) and includes the inline handler.
server.tool( "reload-agent", "Reload agent configuration", {}, async () => { try { // @ts-ignore - The Consul type definitions are incomplete await consul.agent.reload(); return { content: [{ type: "text", text: "Agent configuration reloaded successfully" }] }; } catch (error) { console.error("Error reloading agent:", error); return { content: [{ type: "text", text: "Error reloading agent configuration" }] }; } } ); - src/server.ts:47-47 (registration)Invocation of `registerAgentTools(server, consul)` which registers the "reload-agent" tool among other agent tools.
registerAgentTools(server, consul);