Skip to main content
Glama

fire-event

Trigger and manage custom events by specifying a name and payload, enabling real-time communication and updates within the Consul MCP Server framework.

Instructions

Fire a new event

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName of the event
payloadNoEvent payload

Implementation Reference

  • The handler function for the 'fire-event' tool. It takes name and optional payload, calls consul.event.fire, and returns success or error message.
    async ({ name, payload }) => {
      try {
        // @ts-ignore - The Consul type definitions are incomplete
        const event = await consul.event.fire(name, payload || "");
        return { content: [{ type: "text", text: `Fired event: ${event.ID}` }] };
      } catch (error) {
        console.error("Error firing event:", error);
        return { content: [{ type: "text", text: `Error firing event: ${name}` }] };
      }
    }
  • Input schema for the 'fire-event' tool using Zod validation: name (string, required), payload (string, optional).
    {
      name: z.string().default("").describe("Name of the event"),
      payload: z.string().default("").optional().describe("Event payload"),
    },
  • Registration of the 'fire-event' tool using server.tool, including description, input schema, and handler function.
    server.tool(
      "fire-event",
      "Fire a new event",
      {
        name: z.string().default("").describe("Name of the event"),
        payload: z.string().default("").optional().describe("Event payload"),
      },
      async ({ name, payload }) => {
        try {
          // @ts-ignore - The Consul type definitions are incomplete
          const event = await consul.event.fire(name, payload || "");
          return { content: [{ type: "text", text: `Fired event: ${event.ID}` }] };
        } catch (error) {
          console.error("Error firing event:", error);
          return { content: [{ type: "text", text: `Error firing event: ${name}` }] };
        }
      }
    );
Behavior1/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. 'Fire a new event' implies a write/mutation operation, but it doesn't disclose any behavioral traits such as side effects, permissions required, rate limits, or what happens after firing (e.g., is it broadcast, stored, or processed?). This leaves critical gaps for safe and effective tool invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just three words, which is efficient and front-loaded. However, it's arguably under-specified rather than optimally concise, as it lacks necessary detail for clarity. Every word earns its place, but the overall brevity comes at the cost of completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It fails to explain what 'firing an event' entails, the expected outcomes, or any system-specific context. This inadequacy makes it insufficient for an agent to understand the tool's role and effects in the broader toolset.

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?

Schema description coverage is 100%, with both parameters ('name' and 'payload') clearly documented in the schema. The description adds no additional meaning beyond what the schema provides, such as examples or constraints. However, since the schema fully covers the parameters, the baseline score of 3 is appropriate as the description doesn't need to compensate.

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

Purpose2/5

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

The description 'Fire a new event' is essentially a tautology that restates the tool name 'fire-event' with minimal elaboration. While it indicates the action (fire) and resource (event), it lacks specificity about what kind of events are being fired or what system this operates in, making it vague. It doesn't distinguish from siblings like 'list-events' beyond the basic verb difference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/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. There are no explicit or implied contexts, exclusions, or prerequisites mentioned. Given sibling tools like 'list-events' exist, the lack of differentiation makes it misleading for an agent to determine appropriate usage scenarios.

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