Skip to main content
Glama

read_log_head

Read the first specified lines of a local log file to inspect startup parameters and initial startup logs during troubleshooting.

Instructions

读取日志文件开头指定行数(适合查看启动参数与启动阶段日志)。

Args: file_path: 日志文件绝对路径。 lines: 要读取的行数,默认 100,最大 5000。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesNo
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A3.9/5.0
Behavior3/5

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

No annotations exist, so the description carries the full behavioral burden. It does disclose a meaningful constraint absent from the schema (max 5000 lines, default 100), but says nothing about missing-file behavior, encoding, truncation warnings, or output shape. Adequate, not rich.

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?

One purpose sentence plus a compact Args block; front-loaded purpose, no filler, and the constraint values are attached directly to their parameters.

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?

An output schema exists, so return values need not be described, and the tool is a simple two-parameter read. Purpose, bounds, and both parameters are covered; only error-handling expectations are absent.

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 description coverage is 0%, so the description must compensate, and it does: file_path is defined as an absolute path, lines gets a default and a hard ceiling of 5000. The only gap is that no format/encoding expectation is stated for the path or content.

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+resource (读取日志文件开头指定行数) and adds scope (startup parameters/startup phase logs), which implicitly separates it from the head/tail family. It never names the obvious sibling read_log_tail, so the differentiation is left partly to inference from '开头'.

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 a clear use case — viewing startup parameters and startup-phase logs — which tells the agent when this tool is the right pick over a general read or search. No explicit exclusions or named alternatives are provided.

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