Skip to main content
Glama

sendChat

Send chat messages to a Minecraft server from an AI assistant. This tool enables communication with players and the server through text commands.

Instructions

Send a chat message to the Minecraft server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesMessage to send to the server

Implementation Reference

  • The handler function that executes the sendChat tool logic: checks connection, sends chat message via bot.chat(), handles success/error responses.
    async ({ message }) => {
      if (!botState.isConnected || !botState.bot) {
        return createNotConnectedResponse()
      }
    
      try {
        botState.bot.chat(message)
        return createSuccessResponse(`Message sent: ${message}`)
      } catch (error) {
        return createErrorResponse(error)
      }
    }
  • Zod input schema for the sendChat tool defining the 'message' parameter.
    {
      message: z.string().describe('Message to send to the server'),
    },
  • Registration of the 'sendChat' tool using server.tool, including name, description, schema, and handler.
    server.tool(
      'sendChat',
      'Send a chat message to the Minecraft server',
      {
        message: z.string().describe('Message to send to the server'),
      },
      async ({ message }) => {
        if (!botState.isConnected || !botState.bot) {
          return createNotConnectedResponse()
        }
    
        try {
          botState.bot.chat(message)
          return createSuccessResponse(`Message sent: ${message}`)
        } catch (error) {
          return createErrorResponse(error)
        }
      }
    )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action but doesn't describe what happens after sending (e.g., whether it's broadcast to all players, appears in server logs, has rate limits, requires specific permissions, or if there's any confirmation). For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 that directly states the tool's purpose with zero wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 this is a mutation tool (sending messages implies writing to the server) with no annotations and no output schema, the description is incomplete. It doesn't address behavioral aspects like permissions, side effects, or response expectations, which are crucial for an agent to use it correctly in the context of Minecraft server interaction.

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 the single parameter 'message' clearly documented in the schema. The description doesn't add any parameter details beyond what the schema provides (e.g., message format constraints, character limits, or special commands), so it meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('send a chat message') and the target ('to the Minecraft server'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'getNearbyPlayers' or 'getServerInfo' which might also involve communication, though those are clearly different types of operations.

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 (e.g., server connection status), exclusions, or contextual cues for when chat messaging is appropriate versus other communication methods available in the sibling tools.

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

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/nacal/mcp-minecraft-remote'

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