Skip to main content
Glama

search_fields

Read-onlyIdempotent

Search game fields by name to return their owning class and field type, enabling you to locate targets like health or coins before hooking or reading memory.

Instructions

按名字搜索字段,返回所属类与字段类型。按字段名搜(定位「金币」「血量」这类目标的首选入口)。

total 是真实匹配总数(不受 limit 影响),配合 offset/limit 翻页。 owner 限定单个类;同名类跨程序集时会拒绝并给候选,可用 assembly= 消歧。

Args: pattern: 字段名子串(大小写不敏感)。 offset: 跳过前多少条(配合 total / has_more 翻页)。 limit: 本页最多返回多少条(上限 2000)。 owner: 限定在某一个类里搜。接受完整类名或短名,但短名必须唯一: 若命中多个同名类(常见于不同程序集),本工具会拒绝并返回 candidates,此时请改用完整类名或用 assembly 消歧。 为什么不猜:把两个无关类的字段混在一起返回,ok 仍是 true, 但算出来的偏移必然错,且要到运行时才暴露。 assembly: 程序集名子串,仅用于在 owner 命中多个类时消歧。

Returns: {ok, handle, total, offset, limit, returned, has_more, items} total 是真实匹配总数;若超过句柄上限会带 handle_truncated 与 handle_note(翻页请用本工具的 offset,不要依赖句柄拿全集)。

Input Schema

NameRequiredDescriptionDefault
limitNo
ownerNo
offsetNo
patternYes
assemblyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent, and the description adds substantial extra behavior: `total` is the true match count unaffected by limit, paging is via offset/limit not the handle, oversized results carry handle_truncated/handle_note, and ambiguous owner matches fail with a candidate list instead of silently merging unrelated classes.

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 first line front-loads purpose and the Args/Returns blocks are scannable, but the owner disambiguation is explained twice (once in the preamble, again in Args), and the 'why we don't guess' rationale, while useful, adds length.

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

Completeness5/5

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

For a 5-parameter read tool with no output schema, the description supplies the return shape ({ok, handle, total, offset, limit, returned, has_more, items}), paging semantics, and the truncation edge case, leaving nothing an agent needs missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description does all the work: it defines `pattern` as a case-insensitive name substring, `offset`/`limit` as paging (limit caps at 2000), `owner` as full or unique-short class name, and `assembly` as a disambiguator only relevant when owner matches multiple classes.

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?

States a specific verb+resource (search fields by name) and what is returned (owning class and field type). Explicitly positions itself as the preferred entry point when locating a field such as '金币' or '血量', which distinguishes it from the sibling class/method search tools.

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?

Gives explicit when-to-use ('按字段名搜' first-choice entry), explains that `owner` scopes to a single class, and states that ambiguous short names are rejected with candidates, requiring `assembly=` or a fully qualified name to disambiguate. It even justifies the refusal policy rather than leaving the agent to discover it.

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