Skip to main content
Glama
minmax

mcode-mcp

mcode_history

Read-onlyIdempotent

Read a bounded snapshot of a MiniMax Code session's conversation from its local log without locking, modifying, or waiting for the run. Returns JSON with a cursor to resume reading at any point.

Instructions

Read a bounded snapshot of a MiniMax Code session's visible conversation from the native messages.jsonl under ~/.minimax/v2/sessions. Does not send anything into the run, does not take the session lock, and does not wait for mcode to finish. Returns JSON: session, state (active if this process is running it, otherwise unknown), items (user / assistant / tool / gap), an opaque cursor to resume even at the current EOF, has_more, truncated_tail. Thinking and image binaries are omitted. Caps: limit (default 50, max 200), max_chars per item (default 4000, max 16000), and 100000 chars on the whole JSON page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax items to return (default 50, max 200).
cursorNoOpaque resume token from a previous mcode_history call for this same session and transcript. Omit to read from the start.
sessionYesSession id from [session: <id>] or mcode_sessions / mcode_running.
max_charsNoMax characters per item text (default 4000, max 16000).
include_toolsNoInclude tool calls/results (default true). Filtered tool lines still advance the cursor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly and idempotent annotations, the description adds useful behavioral detail: no run-side effects, no lock, no waiting, exact JSON fields returned, omitted content, and precise caps. This is meaningful behavioral context that annotations alone would not convey.

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 definition is dense but concise: it front-loads the purpose and safety properties, then gives the return shape and caps. Every sentence carries information, and there is no filler or repetition.

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 present, the description properly returns to the return shape (session, state, items, cursor, hasMore, truncatedTail), caps, and omissions. That is enough for an agent to decide when and how to invoke the tool.

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?

Schema coverage is already high, but the description goes further by explaining the cursor can resume at current EOF, note that filtered tool lines still advance the cursor, and the whole-page 100,000-character cap. These details give an agent a more accurate mental model of pagination and limits.

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 description uses a specific verb and resource: 'Read a bounded snapshot of a MiniMax Code session's visible conversation from the native messages.jsonl'. It clearly differentiates itself from sibling tools by stating that it does not send anything into the run, does not take the session lock, and does not wait for mcode to finish.

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?

It gives clear context for when to use it: when an agent needs a non-blocking, read-only view of past conversation without interfering with the run. However, it does not name sibling tools explicitly or provide formal when-not-to-use alternatives, so it stops short of a 5.

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