Skip to main content
Glama
SuxyEE

bt-panel-mcp-server

by SuxyEE

get_nginx_logs

Analyze Nginx HTTP request logs to troubleshoot status code anomalies, traffic sources, and crawler attacks. Reads access or error logs for any site.

Instructions

【Nginx 层日志 — HTTP 请求记录】读取 Nginx 的访问日志(access)或错误日志(error)。记录的是每一条 HTTP 请求:IP、时间、URL、状态码(200/404/499/502)、响应大小、来源页面、UserAgent。适合排查:HTTP 状态码异常、流量来源分析、爬虫/攻击识别、Nginx 配置问题、静态资源 404 等。注意:此工具【不包含】任何业务逻辑、数据库、接口报错等应用层信息。工具会自动在 /www/wwwlogs/ 目录探测日志路径,无需手动填写。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_nameYes网站域名,如 fish.o2oe.net。工具会自动在 /www/wwwlogs/ 下探测日志文件,无需手动指定路径。
log_typeNo日志类型:access(Nginx 访问日志,记录每条 HTTP 请求)或 error(Nginx 错误日志,记录文件缺失/配置错误等),默认 accessaccess
last_linesNo读取最后 N 行,默认 200,最大 2000
log_pathNo手动指定日志文件绝对路径(可选)。工具会先自动探测,自动探测失败后才需要填此参数。
Behavior5/5

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

No annotations are provided, so description carries full burden. It discloses automatic log path detection ('自动在 /www/wwwlogs/ 目录探测日志路径'), lists recorded fields, and clarifies scope (Nginx layer only). The behavior is clearly described without contradictions.

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?

The description is longer than necessary but well-structured: starts with purpose and fields, then use cases, then limitations and auto-detection. It could be more concise by removing repetition from schema descriptions, but it remains clear and front-loaded.

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?

Given 4 parameters, no output schema, and siblings focusing on other log types, the description adequately explains what logs contain (fields listed), when to use, and limitations. It does not detail the exact return format, but the listed fields provide sufficient context. Lacks mention of error log message structure, but overall complete for typical use.

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 coverage is 100%, baseline 3. The description adds value by explaining auto-detection of log paths and providing context (e.g., '无需手动指定路径') beyond schema descriptions. However, some schema info is repeated (e.g., default values). The added context justifies a score of 4.

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 clearly states it reads Nginx access/error logs and lists specific fields (IP, time, URL, status code, etc.). It explicitly distinguishes from application logs and alternative siblings like get_app_logs by stating it does not include business logic or database info. The verb '读取' and resource 'Nginx层日志' are specific and non-tautological.

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?

The description provides explicit use cases: HTTP status code anomalies, traffic analysis, crawler/attack identification, Nginx config issues, static resource 404s. It also clearly states what the tool does not cover ('不包含任何业务逻辑、数据库、接口报错等应用层信息'), implicitly guiding users to get_app_logs for application-level issues. This is explicit when-to-use and when-not-to-use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SuxyEE/bt-panel-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server