Skip to main content
Glama

Get message

get_message
Read-onlyIdempotent

Fetch a Graylog message by reference, read truncated fields in full, or pull surrounding messages within a time window for debugging and incident analysis.

Instructions

One message with all its fields (redacted), by ref. Long values are cut to keep the answer small: 'cut_fields' names them with their size; pass those names in 'fields' to read them. With context_seconds: the messages logged around it instead.

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": {
      "ref": "<ref>"
    },
    "name": "get_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYes'index/message_id' from a previous result's 'ref', or a message id
limitNoContext: max messages, split before/after (60)
queryNoContext: extra Lucene filter inside the window
scopeNoContext from the same host/app ('source', default), same streams, or 'all'
fieldsNoWithout context_seconds: only these fields, each up to its full size; ['*'] for all of them in full
instanceNoInstance from describe, e.g. 'payment/prod'; the default when omitted
context_secondsNoReturn the messages logged within ±this many seconds instead
compact_stacktraceNoWithout context_seconds: fold framework stack frames (default true); false for the raw trace

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.3.1
    • addedInput schema / properties / compact_stacktrace / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / compact_stacktrace / default
      Previous value: -trueNew value: +null
    • changedInput schema / properties / compact_stacktrace / description
      Previous value: -"Fold framework stack frames (default true); false for the raw trace"New value: +"Without context_seconds: fold framework stack frames (default true); false for the raw trace"
    • removedInput schema / properties / compact_stacktrace / type
      Removed value: -"boolean"
    • addedInput schema / properties / context_seconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 86400,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Return the messages logged within ±this many seconds instead",
      +  "title": "Context Seconds"
      +}
    • changedInput schema / properties / fields / description
      Previous value: -"Only these fields, each up to its full size; ['*'] for all of them in full"New value: +"Without context_seconds: only these fields, each up to its full size; ['*'] for all of them in full"
    • changedInput schema / properties / instance / description
      Previous value: -"Instance from list_instances, e.g. 'payment/prod'; the default when omitted"New value: +"Instance from describe, e.g. 'payment/prod'; the default when omitted"
    • addedInput schema / properties / limit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 2,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Context: max messages, split before/after (60)",
      +  "title": "Limit"
      +}
    • addedInput schema / properties / query
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Context: extra Lucene filter inside the window",
      +  "title": "Query"
      +}
    • addedInput schema / properties / scope
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "source",
      +        "stream",
      +        "all"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Context from the same host/app ('source', default), same streams, or 'all'",
      +  "title": "Scope"
      +}
  2. Changed2 schema fields changedv0.2.0
    • changedInput schema / properties / fields / description
      Previous value: -"Only these fields; all fields when omitted"New value: +"Only these fields, each up to its full size; ['*'] for all of them in full"
    • changedInput schema / properties / instance / description
      Previous value: -"Graylog instance (environment) from list_instances, e.g. 'staging' or 'prod'; the default instance when omitted"New value: +"Instance from list_instances, e.g. 'payment/prod'; the default when omitted"
  3. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds the genuinely non-obvious behavior: values are redacted, long values are truncated for response size with 'cut_fields' reporting their size, and setting context_seconds switches the return to a surrounding window rather than the message itself.

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?

Three tight, front-loaded sentences with no filler; the cut_fields/fields round-trip is the most useful fact and appears early. The final context_seconds sentence is telegraphic enough that its phrasing is slightly clipped, but no sentence is wasted.

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 an 8-parameter tool with no output schema, the description covers the two return modes and explains the 'cut_fields' output convention, which compensates for the missing output schema. Context-window parameters (limit, query, scope, instance) are left entirely to the schema, which is acceptable given 100% coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description earns above that by documenting the cross-field interaction between the returned 'cut_fields' and the 'fields' parameter, plus the mode-switching semantics of context_seconds that the schema only states per-parameter in isolation.

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: fetch one message by 'ref' with all fields (redacted). The phrase 'One message ... by ref' implicitly separates it from the search/scan siblings that locate messages, though no sibling is named explicitly.

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

Usage Guidelines4/5

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

Gives actionable workflow guidance for two distinct modes: the truncation round-trip ('cut_fields' names oversized values, pass those names in 'fields' to read them in full) and the context mode ('with context_seconds: the messages logged around it instead'). It stops short of naming alternatives like search_logs when the ref is unknown.

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