Skip to main content
Glama

Get chat messages

get_messages
Read-only

Return the messages of one of the user's chats, in chronological order.

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": {
      "chat_id": "<chat_id>"
    },
    "name": "get_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of (most recent) messages to return (1-100).
chat_idYesThe id of the chat (from list_chats) to read messages from.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds the useful behavioral detail that results come back in chronological order, but says nothing about how the limit interacts with ordering (i.e., that the limit takes the most recent messages) or whether older messages can be paged to.

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?

A single front-loaded sentence with no filler; both the resource and the ordering guarantee are stated immediately.

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?

With annotations carrying the safety profile and a fully documented two-parameter schema, the description covers what the tool returns and in what order. The only real gap is pagination guidance for reading beyond `limit`, which a caller might want.

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 chat_id and limit are already fully documented, including the 1-100 range and default. The description adds only the chronological ordering context; baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb and resource ('Return the messages of one of the user's chats') and scopes it to a single chat, which implicitly separates it from list_chats. It does not name or contrast a sibling tool explicitly, so it falls short of a 5.

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?

The phrase 'of one of the user's chats' implies the chat must already exist, but there is no explicit when-to-use guidance, no pointer to list_chats as the source of chat_id, and no statement about alternatives. Usage is only inferable.

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.