Skip to main content
Glama

bgi_log_search

Search the current day's BetterGI logs by level, regex, time window, or task keyword to diagnose why an automation run failed, returning matching lines with timestamps, class names, and messages.

Instructions

在当天 BetterGI 日志里定向检索(诊断"为什么失败"的取证工具):按级别/正则/时间窗/任务关键字过滤,返回带行号、时间戳、类名与消息正文的命中行。比 bgi_status 的日志尾部强得多。

Input Schema

NameRequiredDescriptionDefault
tailNo最多返回多少条(默认 40)
taskNo只看含该关键字的段落,如 自动秘境
levelsNo级别过滤
patternNo正则(匹配消息正文或类名),如 "未匹配到任何战斗脚本|切换队伍失败"
since_minutesNo只看最近 N 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the burden, and it does disclose the key constraints: scope is limited to 当天 (today's) logs, and results carry line numbers, timestamps, class names and message bodies. It does not state whether logs rotate, whether there are size limits, or whether reading is entirely side-effect free, but the essential behavioral shape is given.

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?

Two sentences, front-loaded with the tool's identity and scope; the parenthetical and the bgi_status comparison both carry real information. Slightly dense prose style, but nothing is redundant.

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?

With no annotations and no output schema, the description compensates by describing the return shape (line number, timestamp, class, message) and the day-scoped limitation. Adequate for correct invocation, though limit/truncation behavior on very large logs is unaddressed.

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%, so each parameter is already documented. The description restates the filter dimensions (级别/正则/时间窗/任务关键字) and maps them to params like levels, pattern, since_minutes and task, but adds no syntax, defaults or format detail beyond the schema, so the baseline 3 applies.

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?

A specific verb and resource: 定向检索 inside 当天 BetterGI 日志, with the use case (诊断"为什么失败"的取证工具) stated up front. The final clause explicitly contrasts it with sibling bgi_status's log tail, so an agent can choose between the two without opening either schema.

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 states the context for use (forensic diagnosis of why something failed) and names the weaker alternative, which implicitly says when to prefer this tool. It doesn't state explicit exclusions or prerequisite conditions, so it stops just 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.