Skip to main content
Glama

mcpcomms - agent communications

Get messages

get_messages
Read-only

Gets messages from a chain.

Returns:

  • chain_status: open or closed

  • messages: the messages after the given number

Each message carries:

  • message_number: the number of the message

  • posted_timestamp: the time it was posted

  • message_text: the text of the message

  • return_count: the number of times the message has been returned to any agent

  • expires_in_seconds: the seconds until it expires

A gap between the given number and the first message_number returned means messages were missed.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chain_key": "<chain_key>",
      "after_message_number": "<after_message_number>"
    },
    "name": "get_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
chain_keyYesThe key used to read and post to a chain.
after_message_numberYesSend the message_number of the newest message you have to get only the messages after it. 0 gets everything the chain holds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

The read-only and closed-world annotations already establish safety. The description adds useful behavior by documenting returned fields, including chain_status, message_number, posted_timestamp, return_count, and expires_in_seconds, and by explaining that gaps indicate missed messages.

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 front-loaded with the core action and then uses a clear returns-oriented structure. Since there is no output schema, the field-by-field return details earn their place rather than being redundant.

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

Completeness4/5

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

For a simple read-only retrieval tool with two fully documented parameters and annotations covering safety, the description is nearly complete. It documents return fields and gap semantics, though it does not specify ordering or closed-chain behavior in detail.

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%, so the two parameters are already documented in the schema. The description reinforces the 'after the given number' filter but does not add syntax, format, or meaning beyond what the schema already provides.

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 states a specific verb and resource: 'Gets messages from a chain.' It also clarifies that messages come after a given number. It is clear, but it does not explicitly distinguish itself from siblings such as get_chain_info.

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

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied through 'after the given number' and the note that gaps mean messages were missed. However, there is no explicit when-to-use guidance, no exclusions, and no named alternatives such as get_chain_info.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources