Skip to main content
Glama

Get Log

get_log
Read-onlyIdempotent

Fetch a single log by its logId: all attributes flattened in (plus a resource object) and the message. Use after a lean logs scan when you need the body of one row. A value longer than 4000 characters is cut and shows a marker; read the rest with path. For custom column selection use run_sql.

Reading one long value: pass path to get one value of the log, in full or in slices. A run_sql, logs or get_log result that cut a long value shows a marker with "truncated": true, the value's full length (chars), its structure (keys) and a "more" call that reads on.

Parameters for a slice: logId; path, what to read: message, an attribute name (exception.stacktrace), or a JSON path into a value holding JSON (body.items[2].name); find, text to jump to: the slice starts just before its first match at or after offset; offset, the character position to start at (default 0); length, how many characters to return (default 20000, max 50000).

A slice returns: logId, path, chars (the value's full length), offset, text (the slice), nextOffset (null once the slice reaches the end), matches (every place find matches in the whole value, up to 20, each with its offset and the text around it; the slice starts at the first one at or after offset), and keys (the structure of the value at path, when it is JSON). To read on, call again with offset=nextOffset; to read another match, call again with offset set to that match's offset.

Returns (no path): the log object.

Input Schema

NameRequiredDescriptionDefault
findNoText to jump to; the slice starts just before its first match at or after offset.
pathNoValue to read in slices: message, an attribute name, or a JSON path, e.g. message, exception.stacktrace
logIdYesULID of the log to fetch
lengthNoCharacters to return. Default 20000, max 50000.
offsetNoCharacter position to start at within the value. Default 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / find
      Added value: +{
      +  "description": "Text to jump to; the slice starts just before its first match at or after offset.",
      +  "type": "string"
      +}
    • addedInput schema / properties / length
      Added value: +{
      +  "description": "Characters to return. Default 20000, max 50000.",
      +  "format": "int32",
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Character position to start at within the value. Default 0.",
      +  "format": "int32",
      +  "type": "integer"
      +}
    • addedInput schema / properties / path
      Added value: +{
      +  "description": "Value to read in slices: message, an attribute name, or a JSON path, e.g. message, exception.stacktrace",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  3. Added
  4. Removed
  5. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false, so the safety profile is covered; the description goes well beyond by disclosing the 4000-char truncation with a marker, the `"truncated": true` flag, the slice protocol, and how to chain `offset=nextOffset` to read on. This is exactly the extra behavioral context the annotations cannot express.

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?

Front-loaded correctly — purpose, then usage, then the slicing sub-protocol, then the plain return. It is dense and somewhat sprawling across return-value and slicing details, but nearly every sentence carries operational information the agent needs given there is no output schema.

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

Completeness5/5

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

With no output schema, the description carries the return-value burden and does so: it describes both the no-path return (the log object) and the slice return (logId, path, chars, offset, text, nextOffset, matches, keys). Combined with the truncation and continuation semantics, an agent has everything needed to call it and consume the result.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds meaning the schema does not: `path` accepts message, an attribute name, or a JSON path like `body.items[2].name`; `find` starts the slice just before its first match at/after offset; `length` defaults to 20000 and caps at 50000. It also explains the interaction between offset, nextOffset, and matches.

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

Purpose5/5

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

The first sentence states a specific verb and resource ('Fetch a single log by its logId') and immediately scopes the return ('all attributes flattened in... and the message'). It goes on to name the siblings it is not — `logs` for scanning and `run_sql` for custom column selection — so an agent can route without opening any schema.

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

Usage Guidelines5/5

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

Explicit when-to-use ('Use after a lean `logs` scan when you need the body of one row') and explicit alternatives ('For custom column selection use run_sql'), plus a distinct slicing sub-mode with its own invocation recipe. Both the retrieval case and the long-value case route the agent correctly.

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