Skip to main content
Glama
GeminiDesk MCP
by LZ7TOP

Read File Tail Lines

fs_read_tail

Read the last specified lines of a file to inspect large logs without exceeding read limits. Specify the path and optional line count to view recent entries.

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": {
      "path": "<path>"
    },
    "name": "fs_read_tail"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes目标文件路径
linesNo读取末尾行数

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

B3.4/5.0
Behavior3/5

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

There are no annotations, so the description carries the full load. The verb 读取 implies a non-destructive read, and the mention of avoiding read limits hints at why tailing exists. It does not describe error behavior for missing files, short files, or how many lines are returned versus requested.

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?

This is a single sentence with the purpose stated up front, followed by the motivating scenario. No sentence is wasted. The only small issue is that '读取上限' is left vague as to whose limit it is.

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

Completeness3/5

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

It is a 2-parameter read tool, and the schema is fully documented, so most of what an agent needs is already present. The definition does not explain return format or coverage, but with no output schema and no annotations, those gaps are minor. The definition is adequate but not complete.

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%, with both the path and lines parameter documented, including the default of 100 and the range 1–2000. The description adds no syntax or meaning beyond that, so the baseline of 3 is appropriate.

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?

The description states a specific verb and resource – reading the last N lines of a file – which is more precise than the name alone. It does not explicitly name how it differs from siblings like fs_read_lines or fs_read_file, so the differentiation is only implicit.

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?

It gives one clear usage scenario: large log files where a full read would exceed limits. However, it never states when NOT to use it or which sibling to use instead (e.g., fs_read_lines for a range or fs_read_file for whole small files).

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