Skip to main content
Glama

mt_get_context

Read-only

Retrieves a length-capped snapshot of a project's mainline memory and recent context, helping agents continue work without exceeding context limits.

Instructions

读取有长度上限的项目主线上下文

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": {
      "project": "<project>"
    },
    "name": "mt_get_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectYes显式项目名,使用 mt_set_project 初始化
maxRecentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.6/5.0
Behavior2/5

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

Annotations only declare readOnlyHint=true, so the description carries most of the behavioral burden. It does add one real trait beyond the annotations — that the returned context is truncated to a length cap — but gives no ceiling value, no ordering or recency semantics, and no indication of what happens when maxRecent is omitted or set to 0.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single short clause with no filler, which is structurally clean. But the brevity comes at the cost of substance — the one sentence spends its words on a vague noun phrase rather than front-loading what the tool returns or how to size the request.

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?

Insufficient for an agent to call it confidently: with no output schema, the description should describe the shape of the returned context, its ordering, and the meaning of the length cap. Neither the resource concept nor the undocumented maxRecent parameter is resolved.

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

Parameters2/5

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

Schema coverage is 50%: the 'project' parameter is already documented in the schema, and 'maxRecent' (0–40) has no description anywhere. The phrase '有长度上限' gestures at the cap but never ties it to maxRecent, its default, or whether 0 means 'no recent items' — so the description does not compensate for the documentation gap.

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

Purpose3/5

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

The description names a verb (读取/read) and a resource (项目主线上下文/mainline project context) with a qualifier that output is length-capped, so the general action is inferable. However, '主线上下文' is never defined — it is unclear whether this is conversation history, a summary, or project metadata — and nothing distinguishes it from siblings such as mt_get_checkpoint or mt_status.

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

Usage Guidelines2/5

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

There is no guidance on when to call this versus the many sibling read tools (mt_get_checkpoint, mt_status, mt_search), nor any stated prerequisite other than the implicit need for an initialized project. At best the read-only nature implies a retrieval use case, but the agent must guess.

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